(self, imagespec, def_imagespec=None)
return imagerepo, tag
Check image:tag syntax
Check image:tag syntax
Check image : tag syntax
def _check_imagespec(self, imagespec, def_imagespec=None):
        """Check image:tag syntax"""
        if (not imagespec) and def_imagespec:
            imagespec = def_imagespec

        try:
            (imagerepo, tag) = imagespec.rsplit(":", 1)
        except (ValueError, AttributeError):
            imagerepo = imagespec
            tag = "latest"

        if not (imagerepo and tag and
                self.dockerioapi.is_repo_name(imagespec)):
            Msg().err("Error: must specify image:tag or repository/image:tag")
            return(None, None)

        return imagerepo, tag
def _check_imagespec ( self , imagespec , def_imagespec = None ) : if ( not imagespec ) and def_imagespec : imagespec = def_imagespec try : ( imagerepo , tag ) = imagespec . rsplit ( ":" , 1 ) except ( ValueError , AttributeError ) : imagerepo = imagespec tag = "latest" if not ( imagerepo and tag and self . dockerioapi . is_repo_name ( imagespec ) ) : Msg ( ) . err ( "Error: must specify image:tag or repository/image:tag" ) return ( None , None ) return imagerepo , tag