From e828c9068a050f1df532c94bc51d9e215c6da0fe Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 28 Feb 2017 18:03:10 +0100 Subject: [PATCH] Fix an issue with some node name format Fix #922 --- gns3server/controller/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py index da884f31..c6caa7bf 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -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)