1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

Fix a conversion issue with some 1.3 topologies

This commit is contained in:
Julien Duponchelle 2017-05-04 12:09:56 +02:00
parent 04220846b3
commit 930e7089db
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -306,7 +306,7 @@ def _convert_1_3_later(topo, topo_path):
node["console_type"] = None node["console_type"] = None
node["symbol"] = ":/symbols/hub.svg" node["symbol"] = ":/symbols/hub.svg"
node["properties"]["ports_mapping"] = [] node["properties"]["ports_mapping"] = []
for port in old_node["ports"]: for port in old_node.get("ports", []):
node["properties"]["ports_mapping"].append({ node["properties"]["ports_mapping"].append({
"name": "Ethernet{}".format(port["port_number"] - 1), "name": "Ethernet{}".format(port["port_number"] - 1),
"port_number": port["port_number"] - 1 "port_number": port["port_number"] - 1