Handle docker running on localhost.

wip-fakessh-exit-status
David Wilson 7 years ago
parent c58d7f517b
commit dfe68b33d6

@ -56,6 +56,9 @@ class DockerizedSshDaemon(object):
self.host = self.get_host() self.host = self.get_host()
def get_host(self): def get_host(self):
if self.docker.api.base_url == 'http+docker://localunixsocket':
return 'localhost'
parsed = urlparse.urlparse(self.docker.api.base_url) parsed = urlparse.urlparse(self.docker.api.base_url)
return parsed.netloc.partition(':')[0] return parsed.netloc.partition(':')[0]

Loading…
Cancel
Save