1
0
mirror of https://github.com/docker/docs.git synced 2026-11-01 22:34:29 +03:00

Merge pull request #3385 from shin-/3316-skip-statusless-events

Skip event objects that don't contain a status field
This commit is contained in:
Joffrey F
2016-04-29 17:50:32 -07:00

View File

@@ -342,7 +342,10 @@ class Project(object):
filters={'label': self.labels()},
decode=True
):
if event['status'] in IMAGE_EVENTS:
# The first part of this condition is a guard against some events
# broadcasted by swarm that don't have a status field.
# See https://github.com/docker/compose/issues/3316
if 'status' not in event or event['status'] in IMAGE_EVENTS:
# We don't receive any image events because labels aren't applied
# to images
continue