Commit 2d35fba9 authored by Samuel GAIST's avatar Samuel GAIST

[database] Read and decode from file before loading json

parent 39d6cd3b
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment