commit | 2184868dd23a88b9334fc3ee0c37bbc2ffa9aaca | [log] [tgz] |
---|---|---|
author | Scott Baker <smbaker@gmail.com> | Wed May 27 13:02:09 2015 -0700 |
committer | Scott Baker <smbaker@gmail.com> | Wed May 27 13:02:09 2015 -0700 |
tree | c4ef41c46d3ac7d46dde5915fe357653591e5bf1 | |
parent | 8761ff0a1c04be188b30ee07eaab7c016f248b85 [diff] |
handle json decoding error
diff --git a/xos/core/xoslib/methods/hpcview.py b/xos/core/xoslib/methods/hpcview.py index e4b39d7..0645405 100644 --- a/xos/core/xoslib/methods/hpcview.py +++ b/xos/core/xoslib/methods/hpcview.py
@@ -48,7 +48,10 @@ if not d: return "null" - d = json.loads(d) + try: + d = json.loads(d) + except: + return "error decoding json '%s'" % str(d) status = d.get("status", "null") if status!="success":