mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-26 03:26:57 +03:00
[2051] Alter Open Logic
This commit is contained in:
1 file changed
+1
-2
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user