fix jsonc.load()
This commit is contained in:
parent
525d71bf89
commit
4aeda6bff9
1 changed files with 2 additions and 4 deletions
|
@ -7,10 +7,8 @@ from js import minify
|
||||||
from utils import json
|
from utils import json
|
||||||
|
|
||||||
|
|
||||||
def load(filename):
|
def load(f):
|
||||||
with open(filename) as f:
|
return loads(f.read())
|
||||||
data = loads(f.read())
|
|
||||||
return data
|
|
||||||
|
|
||||||
def loads(source):
|
def loads(source):
|
||||||
return json.loads(minify(source))
|
return json.loads(minify(source))
|
||||||
|
|
Loading…
Reference in a new issue