Skip to content
Snippets Groups Projects
Commit 64d16b0d authored by Seblu's avatar Seblu
Browse files

image name can use - and _

parent 38d6770b
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ def select_image(name, repoman, best=False):
if istools.isfile(name) and os.path.isfile(name):
return PackageImage(name), None
else:
x = re.match("^((\w+)/)?(\w+)(:v?(\d+))?$", name)
x = re.match("^(([-_\w]+)/)?([-_\w]+)(:v?(\d+))?$", name)
if x is None:
raise Exception("%s is not a valid image" % name)
(repo, image, version) = x.group(2,3,5)
......
......@@ -37,7 +37,7 @@ class Image(object):
'''
Check if @name is a valid image name
'''
return re.match("\w+", buf) is not None
return re.match("[-_\w]+", buf) is not None
@staticmethod
def check_image_version(buf):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment