mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18:02 +01:00
Merge pull request #219 from Ondkloss/feature/quiet_flag
Add support for quiet flag
This commit is contained in:
@@ -24,6 +24,9 @@ from github_backup.github_backup import (
|
||||
def main():
|
||||
args = parse_args()
|
||||
|
||||
if args.quiet:
|
||||
logger.setLevel(logging.WARNING)
|
||||
|
||||
output_directory = os.path.realpath(args.output_directory)
|
||||
if not os.path.isdir(output_directory):
|
||||
logger.info('Create output directory {0}'.format(output_directory))
|
||||
|
||||
@@ -136,6 +136,13 @@ def parse_args(args=None):
|
||||
dest="token_fine",
|
||||
help="fine-grained personal access token (github_pat_....), or path to token (file://...)",
|
||||
) # noqa
|
||||
parser.add_argument(
|
||||
"-q",
|
||||
"--quiet",
|
||||
action="store_true",
|
||||
dest="quiet",
|
||||
help="supress log messages less severe than warning, e.g. info",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--as-app",
|
||||
action="store_true",
|
||||
|
||||
Reference in New Issue
Block a user