diff --git a/bin/is b/bin/is index 9e9b166388d0a563252ff0379ffd6a8553d105b1..0fd362c0af794bb8a45540813a01609157633604 100755 --- a/bin/is +++ b/bin/is @@ -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) diff --git a/installsystems/image.py b/installsystems/image.py index 0a97220f7c27faf413f8bff7bd0f7bb1ba05c730..e753f4ab113b3b3d4a04ac94e11668a79965687c 100644 --- a/installsystems/image.py +++ b/installsystems/image.py @@ -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):