From 8237a94f72860559401fa1740bc8e02412dc1b32 Mon Sep 17 00:00:00 2001 From: Athanasius <github@miggy.org> Date: Thu, 12 Sep 2019 12:20:33 +0100 Subject: [PATCH] Fixes __debug__ dump/ file writing. Similarly to the 'Save Raw Data' fix in 9ccca42b31102fd713b26a7a8223472d364772ab --- EDMarketConnector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 4ebf1cd2..cb9903b9 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -440,7 +440,7 @@ class AppWindow(object): if __debug__: # Recording if isdir('dump'): - with open('dump/%s%s.%s.json' % (data['lastSystem']['name'], data['commander'].get('docked') and '.'+data['lastStarport']['name'] or '', strftime('%Y-%m-%dT%H.%M.%S', localtime())), 'wt') as h: + with open('dump/%s%s.%s.json' % (data['lastSystem']['name'], data['commander'].get('docked') and '.'+data['lastStarport']['name'] or '', strftime('%Y-%m-%dT%H.%M.%S', localtime())), 'wb') as h: h.write(json.dumps(data, ensure_ascii=False, indent=2, sort_keys=True, separators=(',', ': ')).encode('utf-8')) if not monitor.state['ShipType']: # Started game in SRV or fighter