Commit 64d16b0d authored by Seblu's avatar Seblu
Browse files

image name can use - and _

parent 38d6770b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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):