commit | 75234a499c1ec6fd35512c5f3d05947b2ab9685a | [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 | 70ab549affd296ee3c1080bf3d218918d1c93913 [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":