From 9f708305696e685718496b11aa846fa8c6a655fb Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 16 Sep 2014 11:46:09 -0700 Subject: [PATCH] My fix was wrong again. Base this try off of @mantiz's fix in #9016 --- library/cloud/docker | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/library/cloud/docker b/library/cloud/docker index e8f8cc4fa94..57914bb79fe 100644 --- a/library/cloud/docker +++ b/library/cloud/docker @@ -507,18 +507,21 @@ class DockerManager: def get_split_image_tag(self, image): # If image contains a host or org name, omit that from our check - if image.find('/') > 0: + if '/' in image: registry, resource = image.rsplit('/', 1) else: - registry, resource = '', image + registry, resource = None, image # now we can determine if image has a tag - if resource.find(':') > 0: + if ':' in resource: resource, tag = resource.split(':', 1) - return '/'.join((registry, resource)), tag + if registry: + resource = '/'.join((registry, resource)) else: tag = "latest" - return image, tag + resource = image + + return resource, tag def get_summary_counters_msg(self): msg = ""