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

Commit

Permalink
checks if healthChecks is a key of app before checking length (#637) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DeciderWill authored and jkoelker committed May 24, 2019
1 parent 95fcbbb commit 44b8b0c
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 44b8b0c

Please sign in to comment.