1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-18 18:07:37 +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:
A_D 2021-03-15 18:53:20 +02:00 committed by Athanasius
parent 740da49ce1
commit e475ad6659

View File

@ -1216,14 +1216,11 @@ class AppWindow(object):
)
if f:
with open(f, 'wb') as h:
h.write(json.dumps(
data,
ensure_ascii=False,
indent=2,
sort_keys=True,
separators=(',', ': ')).encode('utf-8')
)
h.write(json.dumps(dict(data),
ensure_ascii=False,
indent=2,
sort_keys=True,
separators=(',', ': ')).encode('utf-8'))
except companion.ServerError as e:
self.status['text'] = str(e)