Merge pull request #1835 from aanand/fix-crash-when-container-has-no-name
Ignore containers that don't have a name
(cherry picked from commit 4e12ce39b3)
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
22ccf35fa1
commit
74b4fb89bb
6 changed files with 64 additions and 11 deletions
|
|
@ -310,11 +310,11 @@ class Project(object):
|
|||
else:
|
||||
service_names = self.service_names
|
||||
|
||||
containers = [
|
||||
containers = filter(None, [
|
||||
Container.from_ps(self.client, container)
|
||||
for container in self.client.containers(
|
||||
all=stopped,
|
||||
filters={'label': self.labels(one_off=one_off)})]
|
||||
filters={'label': self.labels(one_off=one_off)})])
|
||||
|
||||
def matches_service_names(container):
|
||||
return container.labels.get(LABEL_SERVICE) in service_names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue