Merge pull request #4798 from shin-/4729-serviceport_repr

Use different method to compute ServicePort.repr
This commit is contained in:
Joffrey F 2017-05-08 12:05:26 -07:00 committed by GitHub
commit cb457a82f1
1 changed files with 1 additions and 1 deletions

View File

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