Skip to content

Commit e2878cb

Browse files
committed
Merge pull request #892 from docker/base_url_none
Don't break if base_url == None and TLS is enabled
2 parents 62d9964 + 6078040 commit e2878cb

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)