Skip to content

Commit 6078040

Browse files
committed
Don't break if base_url == None and TLS is enabled
Signed-off-by: Joffrey F <[email protected]>
1 parent 62d9964 commit 6078040

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, base_url=None, version=None,
4545
timeout=constants.DEFAULT_TIMEOUT_SECONDS, tls=False):
4646
super(Client, self).__init__()
4747

48-
if tls and not base_url.startswith('https://'):
48+
if tls and (not base_url or not base_url.startswith('https://')):
4949
raise errors.TLSParameterError(
5050
'If using TLS, the base_url argument must begin with '
5151
'"https://".')

0 commit comments

Comments
 (0)