Skip to content

Commit

Permalink
After conversion from 1.X check the topology before save to disk
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-duponchelle committed Oct 7, 2016
1 parent a437760 commit b6fa144
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gns3server/controller/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b6fa144

Please sign in to comment.