From cfd74a816464243da0f59551d72ad41de4f21e76 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 29 Sep 2016 14:08:07 +0200 Subject: [PATCH] Fix crash when loading as GNS3 a non topology Fix #692 --- gns3server/controller/topology.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/controller/topology.py b/gns3server/controller/topology.py index 982418cb..1ea40cb3 100644 --- a/gns3server/controller/topology.py +++ b/gns3server/controller/topology.py @@ -91,7 +91,7 @@ def load_topology(path): try: with open(path, encoding="utf-8") as f: topo = json.load(f) - except (OSError, UnicodeEncodeError, json.JSONDecodeError) as e: + except (OSError, UnicodeDecodeError, json.JSONDecodeError) as e: raise aiohttp.web.HTTPConflict(text="Could not load topology {}: {}".format(path, str(e))) if "revision" not in topo or topo["revision"] < GNS3_FILE_FORMAT_REVISION: # If it's an old GNS3 file we need to convert it