mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 16:58:28 +00:00
parent
53dd1bd6e1
commit
8e9c480d8d
@ -293,6 +293,8 @@ class Project:
|
|||||||
name = base_name.format(number, id=number, name="Node")
|
name = base_name.format(number, id=number, name="Node")
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
raise aiohttp.web.HTTPConflict(text="{" + e.args[0] + "} is not a valid replacement string in the node name")
|
raise aiohttp.web.HTTPConflict(text="{" + e.args[0] + "} is not a valid replacement string in the node name")
|
||||||
|
except ValueError 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:
|
if name not in self._allocated_node_names:
|
||||||
self._allocated_node_names.add(name)
|
self._allocated_node_names.add(name)
|
||||||
return name
|
return name
|
||||||
|
Loading…
Reference in New Issue
Block a user