mirror of
https://github.com/GNS3/gns3-server
synced 2025-02-23 13:32:02 +00:00
After conversion from 1.X check the topology before save to disk
This commit is contained in:
parent
a437760f5d
commit
b6fa14454e
@ -100,6 +100,7 @@ def load_topology(path):
|
||||
# first we backup the file
|
||||
shutil.copy(path, path + ".backup{}".format(topo.get("revision", 0)))
|
||||
topo = _convert_1_3_later(topo, path)
|
||||
_check_topology_schema(topo)
|
||||
with open(path, "w+", encoding="utf-8") as f:
|
||||
json.dump(topo, f)
|
||||
elif topo["revision"] > GNS3_FILE_FORMAT_REVISION:
|
||||
|
Loading…
Reference in New Issue
Block a user