Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit 55edf98

Browse files
committed
fix the nonetype error when getting a label of a task; close #189
1 parent 5f1355a commit 55edf98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

haproxy/helper/swarm_mode_link_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def get_task_links(tasks, services, haproxy_service_id, haproxy_nets):
4545
task_slot = "%d" % task.get("Slot", 0)
4646
task_service_id = task.get("ServiceID", "")
4747
task_service_name = services_id_name.get(task_service_id, "")
48-
task_labels = services_id_labels.get(task_service_id)
48+
task_labels = services_id_labels.get(task_service_id,{})
4949

5050
if task_labels.get(LABEL_SWARM_MODE_DEACTIVATE, "").lower() == "true":
5151
continue

0 commit comments

Comments
 (0)