mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-02 01:32:38 +03:00
Ensured that CAPIData objects are JSON Serialisable
While it isnt directly an issue in main (right now), the fix applies here forward, so we may as well do it here and not deal with a headache later.
This commit is contained in:
1 file changed
+2
-2
@@ -697,7 +697,7 @@ class AppWindow(object):
|
||||
system=data['lastSystem']['name'],
|
||||
station=data['commander'].get('docked') and '.' + data['lastStarport']['name'] or '',
|
||||
timestamp=strftime('%Y-%m-%dT%H.%M.%S', localtime())), 'wb') as h:
|
||||
h.write(json.dumps(data,
|
||||
h.write(json.dumps(dict(data),
|
||||
ensure_ascii=False,
|
||||
indent=2,
|
||||
sort_keys=True,
|
||||
@@ -1119,7 +1119,7 @@ class AppWindow(object):
|
||||
initialfile=f'{last_system}{last_starport}.{timestamp}')
|
||||
if f:
|
||||
with open(f, 'wb') as h:
|
||||
h.write(json.dumps(data,
|
||||
h.write(json.dumps(dict(data),
|
||||
ensure_ascii=False,
|
||||
indent=2,
|
||||
sort_keys=True,
|
||||
|
||||
Reference in new issue
Block a user