mirror of https://github.com/docker/docker-py.git
Merge pull request #17 from dhrp/master
Fixed bug by which c.port('<id>', <port>) would fail
This commit is contained in:
commit
8633e5547f
|
|
@ -241,7 +241,7 @@ class Client(requests.Session):
|
|||
def port(self, container, private_port):
|
||||
res = self.get(self._url("/containers/{0}/json".format(container)))
|
||||
json_ = res.json()
|
||||
return json_['NetworkSettings']['PortMapping'][private_port]
|
||||
return json_['NetworkSettings']['PortMapping'][str(private_port)]
|
||||
|
||||
def pull(self, repository, tag=None, registry=None):
|
||||
if repository.count(":") == 1:
|
||||
|
|
|
|||
Loading…
Reference in New Issue