fix python3.x _asdict() return None

Signed-off-by: mengskysama <mengskysama@gmail.com>
This commit is contained in:
mengskysama 2017-05-15 15:22:22 +08:00
parent 2c83c9ffb9
commit 3a76f95e28
1 changed files with 1 additions and 1 deletions

View File

@ -258,7 +258,7 @@ class ServiceSecret(namedtuple('_ServiceSecret', 'source target uid gid mode')):
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]
)