summaryrefslogtreecommitdiff
path: root/docker/clientbase.py
diff options
context:
space:
mode:
authorAanand Prasad <aanand.prasad@gmail.com>2015-08-31 18:07:07 -0700
committerAanand Prasad <aanand.prasad@gmail.com>2015-09-01 16:28:05 -0700
commit1362938f03b2eca3edb0682b5ea48c841dc636c5 (patch)
tree84da679914a15bbdeab69fcb7447726a5ef6f12e /docker/clientbase.py
parent33acb9d2e05d0f3abb7897abbe50dd54600da85b (diff)
downloaddocker-py-1362938f03b2eca3edb0682b5ea48c841dc636c5.tar.gz
Default to 127.0.0.1:2375 on Windows
Following the logic of the Docker client. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Diffstat (limited to 'docker/clientbase.py')
-rw-r--r--docker/clientbase.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/clientbase.py b/docker/clientbase.py
index ce52ffa..0ccab65 100644
--- a/docker/clientbase.py
+++ b/docker/clientbase.py
@@ -1,5 +1,6 @@
import json
import struct
+import sys
import requests
import requests.exceptions
@@ -31,7 +32,7 @@ class ClientBase(requests.Session):
self._auth_configs = auth.load_config()
- base_url = utils.parse_host(base_url)
+ base_url = utils.parse_host(base_url, sys.platform)
if base_url.startswith('http+unix://'):
self._custom_adapter = unixconn.UnixAdapter(base_url, timeout)
self.mount('http+docker://', self._custom_adapter)