Don't log exit status if --operatornotify/level wasn't passed.
This commit is contained in:
parent
9c880f2825
commit
81f81a6c24
1 changed files with 4 additions and 0 deletions
|
@ -178,6 +178,10 @@ def main_decorator(subject, *args, **kwargs):
|
|||
def wrapper(main):
|
||||
def wrapped(argv):
|
||||
(context, argv) = main_log_context(argv, subject, *args, **kwargs)
|
||||
|
||||
if isinstance(context, contextlib.nullcontext):
|
||||
return main(argv)
|
||||
|
||||
with context:
|
||||
status = main(argv)
|
||||
log.info('Program finished, returned %s.', status)
|
||||
|
|
Loading…
Reference in a new issue