浏览代码

fix python3.x _asdict() return None

Signed-off-by: mengskysama <[email protected]>
mengskysama 8 年之前
父节点
当前提交
511b981f11
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compose/config/types.py

+ 1 - 1
compose/config/types.py

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