Skip to content

Commit ec21016

Browse files
authored
Merge pull request #219 from Ondkloss/feature/quiet_flag
Add support for quiet flag
2 parents d7ba570 + ea74aa5 commit ec21016

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

bin/github-backup

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ from github_backup.github_backup import (
2424
def main():
2525
args = parse_args()
2626

27+
if args.quiet:
28+
logger.setLevel(logging.WARNING)
29+
2730
output_directory = os.path.realpath(args.output_directory)
2831
if not os.path.isdir(output_directory):
2932
logger.info('Create output directory {0}'.format(output_directory))

github_backup/github_backup.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ def parse_args(args=None):
136136
dest="token_fine",
137137
help="fine-grained personal access token (github_pat_....), or path to token (file://...)",
138138
) # noqa
139+
parser.add_argument(
140+
"-q",
141+
"--quiet",
142+
action="store_true",
143+
dest="quiet",
144+
help="supress log messages less severe than warning, e.g. info",
145+
)
139146
parser.add_argument(
140147
"--as-app",
141148
action="store_true",

0 commit comments

Comments
 (0)