1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 00:30:33 +03:00

[2051] Alter Open Logic

This commit is contained in:
David Sangrey 2023-11-17 21:09:42 -05:00
parent 4dd83f5fa4
commit 169cfbfc56
No known key found for this signature in database
GPG Key ID: 3AEADBB0186884BC

View File

@ -50,8 +50,7 @@ if __name__ == '__main__':
# unbuffered not allowed for text in python3, so use `1 for line buffering
log_file_path = path.join(tempfile.gettempdir(), f'{appname}.log')
with open(log_file_path, mode='wt', buffering=1) as log_file:
sys.stdout = sys.stderr = log_file
sys.stdout = sys.stderr = open(log_file_path, mode='wt', buffering=1) # Do NOT use WITH here.
# TODO: Test: Make *sure* this redirect is working, else py2exe is going to cause an exit popup