Explorar el Código

fix python3.x _asdict() return None

Signed-off-by: mengskysama <[email protected]>
mengskysama hace 8 años
padre
commit
511b981f11
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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]
         )