mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
After conversion from 1.X check the topology before save to disk
This commit is contained in:
1 file changed
+1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user