mirror of https://github.com/docker/compose.git
Use different method to compute ServicePort.repr
Workaround for https://bugs.python.org/issue24931 Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
98f7f6f228
commit
07680b77a6
|
@ -306,7 +306,7 @@ class ServicePort(namedtuple('_ServicePort', 'target published protocol mode ext
|
|||
|
||||
def repr(self):
|
||||
return dict(
|
||||
[(k, v) for k, v in self._asdict().items() if v is not None]
|
||||
[(k, v) for k, v in zip(self._fields, self) if v is not None]
|
||||
)
|
||||
|
||||
def legacy_repr(self):
|
||||
|
|
Loading…
Reference in New Issue