From 28ab6fed934bd56da2b1f53b7f3952b805433aaf Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Mon, 2 Mar 2009 12:19:23 +0000 Subject: [PATCH] Don't allow spaces in tag names This patch restricts the use of spaces in tags, as this does not allow nice exporting of tags to environment in hooks. One can use underscores or dashes instead of spaces. Reviewed-by: schreiberal --- lib/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/objects.py b/lib/objects.py index 2fbdc58..aebe959 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -179,7 +179,7 @@ class TaggableObject(ConfigObject): constants.MAX_TAG_LEN) if not tag: raise errors.TagError("Tags cannot be empty") - if not re.match("^[ \w.+*/:-]+$", tag): + if not re.match("^[\w.+*/:-]+$", tag): raise errors.TagError("Tag contains invalid characters") def GetTags(self): -- 1.7.10.4