From 126a6e36023dd91d01003db5f1eb30c7fe1b954e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 1 Nov 2022 22:54:01 +0100 Subject: ... --- modules/borgsnap/borgsnap/borgsnap/__main__.py | 6 +++--- modules/zfssnap/zfssnap/zfssnap/__main__.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/borgsnap/borgsnap/borgsnap/__main__.py b/modules/borgsnap/borgsnap/borgsnap/__main__.py index 1a4cc41f..80bf511d 100644 --- a/modules/borgsnap/borgsnap/borgsnap/__main__.py +++ b/modules/borgsnap/borgsnap/borgsnap/__main__.py @@ -358,8 +358,8 @@ def main(): parser = argparse.ArgumentParser(prog='borgsnap') parser.add_argument('--verbosity', dest='log_level', action='append', type=int) - parser.add_argument('--verbose', '-v', dest='log_level', action='append_const', const=-1) - parser.add_argument('--quiet', '-q', dest='log_level', action='append_const', const=1) + parser.add_argument('--verbose', '-v', dest='log_level', action='append_const', const=1) + parser.add_argument('--quiet', '-q', dest='log_level', action='append_const', const=-1) parser.add_argument('--target', metavar='REPO', default='yggdrasil.borgbase:repo') parser.add_argument('--archive-prefix', metavar='REPO', default='yggdrasil.vidhar.') subparsers = parser.add_subparsers() @@ -380,7 +380,7 @@ def main(): log_level = LOG_LEVELS.index(DEFAULT_LOG_LEVEL) for adjustment in args.log_level or (): - log_level = min(len(LOG_LEVELS) - 1, max(log_level + adjustment, 0)) + log_level = min(len(LOG_LEVELS) - 1, max(log_level - adjustment, 0)) logger.setLevel(LOG_LEVELS[log_level]) cmdArgs = {} diff --git a/modules/zfssnap/zfssnap/zfssnap/__main__.py b/modules/zfssnap/zfssnap/zfssnap/__main__.py index ab3a2f66..ffa6dfb9 100644 --- a/modules/zfssnap/zfssnap/zfssnap/__main__.py +++ b/modules/zfssnap/zfssnap/zfssnap/__main__.py @@ -376,8 +376,8 @@ def main(): parser = argparse.ArgumentParser(prog='zfssnap') parser.add_argument('--verbosity', dest='log_level', action='append', type=int) - parser.add_argument('--verbose', '-v', dest='log_level', action='append_const', const=-1) - parser.add_argument('--quiet', '-q', dest='log_level', action='append_const', const=1) + parser.add_argument('--verbose', '-v', dest='log_level', action='append_const', const=1) + parser.add_argument('--quiet', '-q', dest='log_level', action='append_const', const=-1) subparsers = parser.add_subparsers() parser.set_defaults(cmd=autosnap) autosnap_parser = subparsers.add_parser('autosnap') @@ -402,7 +402,7 @@ def main(): log_level = LOG_LEVELS.index(DEFAULT_LOG_LEVEL) for adjustment in args.log_level or (): - log_level = min(len(LOG_LEVELS) - 1, max(log_level + adjustment, 0)) + log_level = min(len(LOG_LEVELS) - 1, max(log_level - adjustment, 0)) logger.setLevel(LOG_LEVELS[log_level]) cmdArgs = {} -- cgit v1.2.3