Fixed return code handling

This commit is contained in:
2Shirt 2019-04-14 17:17:11 -07:00
parent cf1d11eb78
commit 1b312658e9
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -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