Skip to content

Commit f73791a

Browse files
author
Nicho Kappel
committed
_get_image_basename_and_tag formatting
1 parent f442f32 commit f73791a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

binderhub/builder.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ def _get_image_basename_and_tag(full_name):
7171
image_name = full_name
7272
tag = 'latest'
7373

74-
if re.fullmatch('[a-z0-9]{4,40}/[a-z0-9\._-]{2,255}', image_name):
74+
if re.fullmatch('[a-z0-9]{4,40}/[a-z0-9._-]{2,255}', image_name):
7575
# if it looks like a Docker Hub image name, we're done
7676
return image_name, tag
77-
else:
78-
# if the image isn't implied to origin at Docker Hub, the first part has to be a registry
79-
image_basename = '/'.join(image_name.split('/')[1:])
80-
return image_basename, tag
77+
# if the image isn't implied to origin at Docker Hub,
78+
# the first part has to be a registry
79+
image_basename = '/'.join(image_name.split('/')[1:])
80+
return image_basename, tag
8181

8282

8383
def _generate_build_name(build_slug, ref, prefix='', limit=63, ref_length=6):

0 commit comments

Comments
 (0)