Kaydet (Commit) 60780403 authored tarafından Joffrey F's avatar Joffrey F

Don't break if base_url == None and TLS is enabled

Signed-off-by: 's avatarJoffrey F <joffrey@docker.com>
üst 62d9964c
...@@ -45,7 +45,7 @@ class Client( ...@@ -45,7 +45,7 @@ class Client(
timeout=constants.DEFAULT_TIMEOUT_SECONDS, tls=False): timeout=constants.DEFAULT_TIMEOUT_SECONDS, tls=False):
super(Client, self).__init__() super(Client, self).__init__()
if tls and not base_url.startswith('https://'): if tls and (not base_url or not base_url.startswith('https://')):
raise errors.TLSParameterError( raise errors.TLSParameterError(
'If using TLS, the base_url argument must begin with ' 'If using TLS, the base_url argument must begin with '
'"https://".') '"https://".')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment