diff --git a/docker/client.py b/docker/client.py
index <HASH>..<HASH> 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -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:
Fixed bug by which c.port('<id>', <port>) would fail because when port not a string

e.g. 

c.port('e<I>bc<I>f8d5', <I>)



would fail



and 

c.port('e<I>bc<I>f8d5', '<I>') would work. I now inserted str() so it should always work.