aboutsummaryrefslogtreecommitdiffstats
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test.py b/test.py
index e7957989d..9724a4ab3 100755
--- a/test.py
+++ b/test.py
@@ -58,7 +58,11 @@ def readJSONFile(fname):
_die("Not a file:", fname)
with open(fname, "r") as f:
fcontents = f.read()
- return json.loads(fcontents)
+ try:
+ fjson = json.loads(fcontents)
+ return fjson
+ except:
+ _logerror("Could not load json:", fname)
def writeJSONFile(fname, fcontents):
if not os.path.exists(os.path.dirname(fname)):