kompress.kopen improvements

- tests
- uniform handling for bytes/str, always return utf8 str by default
This commit is contained in:
Dima Gerasimov 2020-05-04 08:37:36 +01:00
parent c3a77b6256
commit 8b8a85e8c3
7 changed files with 52 additions and 24 deletions

View file

@ -117,7 +117,7 @@ class ZipExport:
path += '.js'
with kompress.kopen(self.epath, path) as fo:
ddd = fo.read().decode('utf8')
ddd = fo.read()
start = ddd.index('[')
ddd = ddd[start:]
for j in json.loads(ddd):