Skip to content

Commit 8639088

Browse files
committed
shorter convert_to_hostname
1 parent b1a858a commit 8639088

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docker/auth/auth.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ def resolve_authconfig(authconfig, registry=None):
8080

8181

8282
def convert_to_hostname(url):
83-
url = url.replace('http://', '')
84-
url = url.replace('https://', '')
85-
return url.split('/', 1)[0]
83+
return url.replace('http://', '').replace('https://', '').split('/', 1)[0]
8684

8785

8886
def encode_auth(auth_info):

0 commit comments

Comments
 (0)