Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

checks if healthChecks is a key of app before checking length (#637) #638

Merged
merged 1 commit into from
May 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion marathon_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ def get_apps(marathon, apps=[]):
old_tasks = sorted(old['tasks'], key=lambda task: task['id'])

healthy_new_instances = 0
if len(app['healthChecks']) > 0:
if 'healthChecks' in app and len(app['healthChecks']) > 0:
for task in new['tasks']:
if 'healthCheckResults' not in task:
continue
Expand Down