From 6078040318547ca7a678b54cd420e034c21171ab Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Fri, 8 Jan 2016 16:41:15 -0800 Subject: [PATCH] Don't break if base_url == None and TLS is enabled Signed-off-by: Joffrey F --- docker/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/client.py b/docker/client.py index d339f3b3e0..e73adb8f67 100644 --- a/docker/client.py +++ b/docker/client.py @@ -45,7 +45,7 @@ def __init__(self, base_url=None, version=None, timeout=constants.DEFAULT_TIMEOUT_SECONDS, tls=False): 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( 'If using TLS, the base_url argument must begin with ' '"https://".')