Commit 28ab6fed authored by Iustin Pop's avatar Iustin Pop
Browse files

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
parent 77031881
......@@ -179,7 +179,7 @@ class TaggableObject(ConfigObject):
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):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment