Skip to content
Snippets Groups Projects
Commit 2d35fba9 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[database] Read and decode from file before loading json

parent 39d6cd3b
No related branches found
No related tags found
2 merge requests!17Merge development branch 1.5.x,!10Py3 compatibility
......@@ -145,7 +145,7 @@ class Runner(object):
return
with open(filename, 'rb') as f:
objs = simplejson.load(f)
objs = simplejson.loads(f.read().decode('utf-8'))
Entry = namedtuple('Entry', sorted(objs[0].keys()))
objs = [ Entry(**x) for x in objs ]
......@@ -241,7 +241,7 @@ class Database(object):
return
with open(json_path, 'rb') as f:
self.data = simplejson.load(f)
self.data = simplejson.loads(f.read().decode('utf-8'))
self.code_path = self.storage.code.path
self.code = self.storage.code.load()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment