Strip space from all nodes names

Fix #727
This commit is contained in:
Julien Duponchelle
2016-10-18 11:11:45 +02:00
parent a8ffaa9cb5
commit dd849f7945
2 changed files with 19 additions and 0 deletions

View File

@ -15,6 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import re
import os
import json
import uuid
@ -282,6 +283,7 @@ class Project:
if base_name is None:
return None
base_name = re.sub(r"[ ]", "", base_name)
self.remove_allocated_node_name(base_name)
if '{0}' in base_name or '{id}' in base_name:
# base name is a template, replace {0} or {id} by an unique identifier