mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
parent
79d376652c
commit
cfd74a8164
@ -91,7 +91,7 @@ def load_topology(path):
|
|||||||
try:
|
try:
|
||||||
with open(path, encoding="utf-8") as f:
|
with open(path, encoding="utf-8") as f:
|
||||||
topo = json.load(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)))
|
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 "revision" not in topo or topo["revision"] < GNS3_FILE_FORMAT_REVISION:
|
||||||
# If it's an old GNS3 file we need to convert it
|
# If it's an old GNS3 file we need to convert it
|
||||||
|
Loading…
Reference in New Issue
Block a user