bug fix on topology_rest.py
diff --git a/web/topology_rest.py b/web/topology_rest.py
index bc52992..efc395f 100755
--- a/web/topology_rest.py
+++ b/web/topology_rest.py
@@ -212,7 +212,6 @@
return "http://" + host + ":8080"
## Switch ##
-=======
@app.route("/wm/core/topology/switches/all/json")
def switches():
if request.args.get('proxy') == None:
@@ -818,11 +817,14 @@
print command
result = os.popen(command).read()
except:
-
exit
- resp = Response(result, status=200, mimetype='application/json')
- return resp
+ if len(result) == 0:
+ resp = Response(result, status=400, mimetype='text/html')
+ return "no iperf file found (flowid %s)" % flow_id;
+ else:
+ resp = Response(result, status=200, mimetype='application/json')
+ return resp
if __name__ == "__main__":