Check whether Mesos task labels are available

This commit is contained in:
Chang Lan 2018-12-04 14:06:47 -08:00
parent a058406b24
commit 25dc521186

View File

@ -113,8 +113,10 @@ func (s *state) fetchLabelsFromTask(exID string, labels map[string]string) error
}
}
for _, l := range t.Labels.Labels {
labels[l.Key] = *l.Value
if t.Labels != nil {
for _, l := range t.Labels.Labels {
labels[l.Key] = *l.Value
}
}
return nil