Merge pull request #17 from dhrp/master

Fixed bug by which c.port('<id>', <port>) would fail
This commit is contained in:
Joffrey F 2013-07-11 12:33:42 -07:00
commit 8633e5547f
1 changed files with 1 additions and 1 deletions

View File

@ -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: