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 authored and Athanasius committed 2021-04-01 14:45:51 +01:00
1 parent 740da49ce1
commit e475ad6659
1 file changed
+5 -8
+5 -8
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)