From 0910712657f23484f77d319482ce4c764df80ddb Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 8 Sep 2016 10:54:54 +0200 Subject: [PATCH] Handle more topologie loading errrors Fix #671 --- 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 a951a21c3..cc3fad01b 100644 --- a/gns3server/controller/topology.py +++ b/gns3server/controller/topology.py @@ -91,7 +91,7 @@ def load_topology(path): try: with open(path) as f: topo = json.load(f) - except OSError as e: + except (OSError, UnicodeEncodeError, 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