keep MultiMystery.py console open in case of crash, as users typically don't know how to keep a console open

This commit is contained in:
Fabian Dill 2020-01-17 20:24:21 +01:00
parent 1c736f8afe
commit 2ff2b5b30c
1 changed files with 69 additions and 64 deletions

View File

@ -55,6 +55,7 @@ def feedback(text:str):
if __name__ == "__main__": if __name__ == "__main__":
try:
print(f"{__author__}'s MultiMystery Launcher V{__version__}") print(f"{__author__}'s MultiMystery Launcher V{__version__}")
if not os.path.exists(enemizer_location): if not os.path.exists(enemizer_location):
feedback(f"Enemizer not found at {enemizer_location}, please adjust the path in MultiMystery.py's config or put Enemizer in the default location.") feedback(f"Enemizer not found at {enemizer_location}, please adjust the path in MultiMystery.py's config or put Enemizer in the default location.")
@ -122,3 +123,7 @@ if __name__ == "__main__":
print(f"Removed file {file} that is now present in the zipfile") print(f"Removed file {file} that is now present in the zipfile")
subprocess.call(f"py -{py_version} MultiServer.py --multidata {os.path.join(outputpath, multidataname)}") subprocess.call(f"py -{py_version} MultiServer.py --multidata {os.path.join(outputpath, multidataname)}")
except:
import traceback
traceback.print_exc()
input("Press enter to close")