Fixed return code handling
This commit is contained in:
parent
cf1d11eb78
commit
1b312658e9
1 changed files with 4 additions and 2 deletions
|
|
@ -42,6 +42,7 @@ def get_user_name():
|
||||||
|
|
||||||
# Main section
|
# Main section
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
return_code = 0
|
||||||
# Set log
|
# Set log
|
||||||
try:
|
try:
|
||||||
global_vars['LogDir'] = '{}/Logs'.format(
|
global_vars['LogDir'] = '{}/Logs'.format(
|
||||||
|
|
@ -169,10 +170,11 @@ if __name__ == '__main__':
|
||||||
print_standard('\nDone.')
|
print_standard('\nDone.')
|
||||||
pause('Press Enter to exit...')
|
pause('Press Enter to exit...')
|
||||||
exit_script()
|
exit_script()
|
||||||
except SystemExit:
|
except SystemExit as e:
|
||||||
pass
|
return_code = e.code
|
||||||
except:
|
except:
|
||||||
major_exception()
|
major_exception()
|
||||||
|
|
||||||
|
exit_script(return_code)
|
||||||
|
|
||||||
# vim: sts=2 sw=2 ts=2
|
# vim: sts=2 sw=2 ts=2
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue