fix in error handling in topology_rest.py
diff --git a/web/topology_rest.py b/web/topology_rest.py
index efc395f..d55bf7f 100755
--- a/web/topology_rest.py
+++ b/web/topology_rest.py
@@ -188,15 +188,12 @@
command = "curl -s %s" % (url)
result = os.popen(command).read()
parsedResult = json.loads(result)
+ if type(parsedResult) == 'dict' and parsedResult.has_key('code'):
+ print "REST %s returned code %s" % (command, parsedResult['code'])
+ code=500
except:
print "REST IF %s has issue" % command
result = ""
-
- if type(parsedResult) == 'dict' and parsedResult.has_key('code'):
- print "REST %s returned code %s" % (command, parsedResult['code'])
- code=500
-
- if result == "":
code = 500
return (code, result)