Return status from running command

This way when someone use code like `sys.exit(main())` it will have
proper exit code on error (so different than `0`).

Story: 2001246
Task: 5776

Change-Id: I1c04fbf73d1fc44da7738c8f22296992d2e7a4f8
This commit is contained in:
Dobroslaw Zybort 2019-01-04 12:51:23 +01:00
parent 1b00a197ee
commit 0b14b4d492
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ def main(args=None):
encoding = locale.getpreferredencoding()
if encoding:
args = map(lambda arg: arg.decode(encoding), args)
MonascaShell().run(args)
return MonascaShell().run(args)
except Exception as e:
if '--debug' in args or '-d' in args:
raise