mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-15 08:40:34 +03:00
Merge pull request #915 from A-UNDERSCORE-D/fix/908/capidata-not-dict
Ensured that CAPIData objects are JSON Serialisable
This commit is contained in:
commit
2da5e0a666
@ -695,7 +695,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,
|
||||
@ -1122,7 +1122,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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user