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
|
||||
if __name__ == '__main__':
|
||||
return_code = 0
|
||||
# Set log
|
||||
try:
|
||||
global_vars['LogDir'] = '{}/Logs'.format(
|
||||
|
|
@ -169,10 +170,11 @@ if __name__ == '__main__':
|
|||
print_standard('\nDone.')
|
||||
pause('Press Enter to exit...')
|
||||
exit_script()
|
||||
except SystemExit:
|
||||
pass
|
||||
except SystemExit as e:
|
||||
return_code = e.code
|
||||
except:
|
||||
major_exception()
|
||||
|
||||
exit_script(return_code)
|
||||
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
|
|
|||
Loading…
Reference in a new issue