summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-11-01 22:54:01 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-11-01 22:54:01 +0100
commit126a6e36023dd91d01003db5f1eb30c7fe1b954e (patch)
treea2131c04d758d4200c78ddbdca57f5a2f84aed63 /modules
parent2af7916d00281ae521cad1ee2881dbbe0e0c3dfa (diff)
downloadnixos-126a6e36023dd91d01003db5f1eb30c7fe1b954e.tar
nixos-126a6e36023dd91d01003db5f1eb30c7fe1b954e.tar.gz
nixos-126a6e36023dd91d01003db5f1eb30c7fe1b954e.tar.bz2
nixos-126a6e36023dd91d01003db5f1eb30c7fe1b954e.tar.xz
nixos-126a6e36023dd91d01003db5f1eb30c7fe1b954e.zip
...
Diffstat (limited to 'modules')
-rw-r--r--modules/borgsnap/borgsnap/borgsnap/__main__.py6
-rw-r--r--modules/zfssnap/zfssnap/zfssnap/__main__.py6
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():
358 358
359 parser = argparse.ArgumentParser(prog='borgsnap') 359 parser = argparse.ArgumentParser(prog='borgsnap')
360 parser.add_argument('--verbosity', dest='log_level', action='append', type=int) 360 parser.add_argument('--verbosity', dest='log_level', action='append', type=int)
361 parser.add_argument('--verbose', '-v', dest='log_level', action='append_const', const=-1) 361 parser.add_argument('--verbose', '-v', dest='log_level', action='append_const', const=1)
362 parser.add_argument('--quiet', '-q', dest='log_level', action='append_const', const=1) 362 parser.add_argument('--quiet', '-q', dest='log_level', action='append_const', const=-1)
363 parser.add_argument('--target', metavar='REPO', default='yggdrasil.borgbase:repo') 363 parser.add_argument('--target', metavar='REPO', default='yggdrasil.borgbase:repo')
364 parser.add_argument('--archive-prefix', metavar='REPO', default='yggdrasil.vidhar.') 364 parser.add_argument('--archive-prefix', metavar='REPO', default='yggdrasil.vidhar.')
365 subparsers = parser.add_subparsers() 365 subparsers = parser.add_subparsers()
@@ -380,7 +380,7 @@ def main():
380 log_level = LOG_LEVELS.index(DEFAULT_LOG_LEVEL) 380 log_level = LOG_LEVELS.index(DEFAULT_LOG_LEVEL)
381 381
382 for adjustment in args.log_level or (): 382 for adjustment in args.log_level or ():
383 log_level = min(len(LOG_LEVELS) - 1, max(log_level + adjustment, 0)) 383 log_level = min(len(LOG_LEVELS) - 1, max(log_level - adjustment, 0))
384 logger.setLevel(LOG_LEVELS[log_level]) 384 logger.setLevel(LOG_LEVELS[log_level])
385 385
386 cmdArgs = {} 386 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():
376 376
377 parser = argparse.ArgumentParser(prog='zfssnap') 377 parser = argparse.ArgumentParser(prog='zfssnap')
378 parser.add_argument('--verbosity', dest='log_level', action='append', type=int) 378 parser.add_argument('--verbosity', dest='log_level', action='append', type=int)
379 parser.add_argument('--verbose', '-v', dest='log_level', action='append_const', const=-1) 379 parser.add_argument('--verbose', '-v', dest='log_level', action='append_const', const=1)
380 parser.add_argument('--quiet', '-q', dest='log_level', action='append_const', const=1) 380 parser.add_argument('--quiet', '-q', dest='log_level', action='append_const', const=-1)
381 subparsers = parser.add_subparsers() 381 subparsers = parser.add_subparsers()
382 parser.set_defaults(cmd=autosnap) 382 parser.set_defaults(cmd=autosnap)
383 autosnap_parser = subparsers.add_parser('autosnap') 383 autosnap_parser = subparsers.add_parser('autosnap')
@@ -402,7 +402,7 @@ def main():
402 log_level = LOG_LEVELS.index(DEFAULT_LOG_LEVEL) 402 log_level = LOG_LEVELS.index(DEFAULT_LOG_LEVEL)
403 403
404 for adjustment in args.log_level or (): 404 for adjustment in args.log_level or ():
405 log_level = min(len(LOG_LEVELS) - 1, max(log_level + adjustment, 0)) 405 log_level = min(len(LOG_LEVELS) - 1, max(log_level - adjustment, 0))
406 logger.setLevel(LOG_LEVELS[log_level]) 406 logger.setLevel(LOG_LEVELS[log_level])
407 407
408 cmdArgs = {} 408 cmdArgs = {}