Merge pull request #2122 from changlan/check-mesos-task-label

Fix Panic: Check whether Mesos task labels are available
This commit is contained in:
David Ashpole 2018-12-04 17:53:42 -08:00 committed by GitHub
commit ba5704f4bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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