After conversion from 1.X check the topology before save to disk

This commit is contained in:
Julien Duponchelle committed 2016-10-07 11:56:55 +02:00
1 parent a437760f5d
commit b6fa14454e
1 file changed
+1
+1
View File
@@ -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: