From 959c08449ec44cc8ac1d2fac0596dccac046e4a7 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Fri, 3 Feb 2017 14:56:55 +0100 Subject: [PATCH] Do not crash if you pass {name} in name --- 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 4debcb73..2e360b15 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -289,7 +289,7 @@ class Project: if '{0}' in base_name or '{id}' in base_name: # base name is a template, replace {0} or {id} by an unique identifier for number in range(1, 1000000): - name = base_name.format(number, id=number) + name = base_name.format(number, id=number, name="Node") if name not in self._allocated_node_names: self._allocated_node_names.add(name) return name