Hi - I'm using Python-Portable to run a Python script which exits with a non-zero value if there has been an error:
except:
exc_type, exc_value, exc_traceback = sys.exc_info()
logging.error("Unexpected error: " + str(exc_type))
logging.error("Unexpected error: " + str(exc_value))
sys.exit(-1)
When I run this script using regular Python installed on Windows I can see an %errorlevel% of -1 passed back to the command shell, yet if I run it with Python-Portable the errorlevel is always 0, even if I raise a sys.exist(-1) from within the called script.
Is there a way of asking Python-Portable to exit with a specific error level from within a Python script?