main: catch unexpected exceptions

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-01-14 22:20:06 +02:00
parent 7adc78fdf6
commit 3057a4e072
+7 -1
View File
@@ -12,4 +12,10 @@ def main(argv=None):
Logger.error('Initialization error: {}'.format(str(ex)))
return 255
return cmd.run_cmd()
try:
ret = cmd.run_cmd()
except Exception as ex:
Logger.error('Unexpected error: {}'.format(str(ex)))
return 254
return ret