From 9569818bb04293af7a72061cfcfb1264f7c73bd2 Mon Sep 17 00:00:00 2001 From: mazhead Date: Thu, 4 Apr 2019 17:39:25 +0200 Subject: [PATCH] Return status as integer (#63) During the first start the if statement on line 237 does not get evaluated correctly and will not "return" Therefore by any restart the first evaluation triggers a update even if the original status is same. --- cachet_url_monitor/configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cachet_url_monitor/configuration.py b/cachet_url_monitor/configuration.py index 21ebc34..afd8b75 100644 --- a/cachet_url_monitor/configuration.py +++ b/cachet_url_monitor/configuration.py @@ -60,7 +60,7 @@ def get_current_status(endpoint_url, component_id, headers): if get_status_request.ok: # The component exists. - return get_status_request.json()['data']['status'] + return int(get_status_request.json()['data']['status']) else: raise ComponentNonexistentError(component_id)