diff options
Diffstat (limited to 'docker/client.py')
-rw-r--r-- | docker/client.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docker/client.py b/docker/client.py index b811d36..6e8b278 100644 --- a/docker/client.py +++ b/docker/client.py @@ -60,6 +60,7 @@ class Client( if base_url.startswith('http+unix://'): self._custom_adapter = UnixAdapter(base_url, timeout) self.mount('http+docker://', self._custom_adapter) + self._unmount('http://', 'https://') self.base_url = 'http+docker://localunixsocket' elif base_url.startswith('npipe://'): if not constants.IS_WINDOWS_PLATFORM: @@ -368,6 +369,10 @@ class Client( [x for x in self._multiplexed_buffer_helper(res)] ) + def _unmount(self, *args): + for proto in args: + self.adapters.pop(proto) + def get_adapter(self, url): try: return super(Client, self).get_adapter(url) |