mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 22:41:12 +02:00
Merge branch '2.0' into 2.1
This commit is contained in:
335 files changed
+1000
-5777
No files matched your search
@@ -275,6 +275,7 @@ class Controller:
|
||||
@settings.setter
|
||||
def settings(self, val):
|
||||
self._settings = val
|
||||
self.save()
|
||||
self.notification.emit("settings.updated", val)
|
||||
|
||||
@asyncio.coroutine
|
||||
|
||||
@@ -293,7 +293,7 @@ class Project:
|
||||
name = base_name.format(number, id=number, name="Node")
|
||||
except KeyError as e:
|
||||
raise aiohttp.web.HTTPConflict(text="{" + e.args[0] + "} is not a valid replacement string in the node name")
|
||||
except ValueError as e:
|
||||
except (ValueError, IndexError) as e:
|
||||
raise aiohttp.web.HTTPConflict(text="{} is not a valid replacement string in the node name".format(base_name))
|
||||
if name not in self._allocated_node_names:
|
||||
self._allocated_node_names.add(name)
|
||||
|
||||
@@ -142,7 +142,11 @@ def load_topology(path):
|
||||
if topo["revision"] < 8:
|
||||
topo = _convert_2_0_0(topo, path)
|
||||
|
||||
_check_topology_schema(topo)
|
||||
try:
|
||||
_check_topology_schema(topo)
|
||||
except aiohttp.web.HTTPConflict as e:
|
||||
log.error("Can't load the topology %s", path)
|
||||
raise e
|
||||
|
||||
if changed:
|
||||
with open(path, "w+", encoding="utf-8") as f:
|
||||
|
||||
Reference in new issue
Block a user