1
0
Эх сурвалжийг харах

Fixes --exit-code-from

 - tried to find the length and array index of a filter object

Signed-off-by: Duncan Paterson <[email protected]>
Duncan Paterson 8 жил өмнө
parent
commit
397faf6172
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      compose/cli/main.py

+ 2 - 2
compose/cli/main.py

@@ -941,9 +941,9 @@ class TopLevelCommand(object):
 
                 exit_code = 0
                 if exit_value_from:
-                    candidates = filter(
+                    candidates = list(filter(
                         lambda c: c.service == exit_value_from,
-                        attached_containers)
+                        attached_containers))
                     if not candidates:
                         log.error(
                             'No containers matching the spec "{0}" '