1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-13 20:08:55 +00:00

Fix conversion of project from 1.X with custom symbol for cloud

This commit is contained in:
Julien Duponchelle 2017-03-28 09:12:36 +02:00
parent 132bc87081
commit aae37034e1
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -348,9 +348,11 @@ def _convert_1_3_later(topo, topo_path):
node["symbol"] = ":/symbols/router.svg"
elif old_node["type"] == "Cloud":
old_node["ports"] = _create_cloud(node, old_node, ":/symbols/cloud.svg")
symbol = old_node.get("symbol", ":/symbols/cloud.svg")
old_node["ports"] = _create_cloud(node, old_node, symbol)
elif old_node["type"] == "Host":
old_node["ports"] = _create_cloud(node, old_node, ":/symbols/computer.svg")
symbol = old_node.get("symbol", ":/symbols/computer.svg")
old_node["ports"] = _create_cloud(node, old_node, symbol)
else:
raise NotImplementedError("Conversion of {} is not supported".format(old_node["type"]))