Bug 933885 part 2a: remove fake JSON parser from runxpcshelltests.py (Python 2.6 now being required). r=gps

This commit is contained in:
Zack Weinberg
2014-01-25 23:27:11 -05:00
parent 72931b53a5
commit 20cda3d1b6

View File

@@ -71,13 +71,6 @@ import manifestparser
import mozcrash
import mozinfo
# ---------------------------------------------------------------
#TODO: replace this with json.loads when Python 2.6 is required.
def parse_json(j):
"""
Awful hack to parse a restricted subset of JSON strings into Python dicts.
"""
return eval(j, {'true':True,'false':False,'null':None})
""" Control-C handling """
gotSIGINT = False
@@ -1279,7 +1272,7 @@ class XPCShellTests(object):
if not os.path.isfile(mozInfoFile):
self.log.error("Error: couldn't find mozinfo.json at '%s'. Perhaps you need to use --build-info-json?" % mozInfoFile)
return False
self.mozInfo = parse_json(open(mozInfoFile).read())
self.mozInfo = json.loads(open(mozInfoFile).read())
mozinfo.update(self.mozInfo)
# buildEnvironment() needs mozInfo, so we call it after mozInfo is initialized.