minor cleanup
This commit is contained in:
parent
b448890210
commit
e35daf95c0
@ -36,6 +36,7 @@ def main(sysargv: List[str]) -> None:
|
|||||||
args.func(args)
|
args.func(args)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
worker = None
|
||||||
return_code = 1
|
return_code = 1
|
||||||
try:
|
try:
|
||||||
# Load and run worker
|
# Load and run worker
|
||||||
@ -51,7 +52,7 @@ def main(sysargv: List[str]) -> None:
|
|||||||
except BaseException:
|
except BaseException:
|
||||||
logger.exception('Fatal exception!')
|
logger.exception('Fatal exception!')
|
||||||
finally:
|
finally:
|
||||||
if worker is not None:
|
if worker:
|
||||||
worker.exit()
|
worker.exit()
|
||||||
sys.exit(return_code)
|
sys.exit(return_code)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user