minor cleanup

This commit is contained in:
hroff-1902 2019-03-22 23:41:48 +03:00
parent b448890210
commit e35daf95c0

View File

@ -36,6 +36,7 @@ def main(sysargv: List[str]) -> None:
args.func(args)
return
worker = None
return_code = 1
try:
# Load and run worker
@ -51,7 +52,7 @@ def main(sysargv: List[str]) -> None:
except BaseException:
logger.exception('Fatal exception!')
finally:
if worker is not None:
if worker:
worker.exit()
sys.exit(return_code)