Update notify.py (#38526)

Clickatell can returns 202 when a message is accepted for delivery. So, success can be indicated by 200 or 202 code (https://archive.clickatell.com/developers/api-docs/http-status-codes-rest/)
This commit is contained in:
Daniel Correa Lobato
2020-08-04 16:51:15 +02:00
committed by GitHub
parent df8e179207
commit 86fc977ff5
@@ -37,5 +37,5 @@ class ClickatellNotificationService(BaseNotificationService):
data = {"apiKey": self.api_key, "to": self.recipient, "content": message}
resp = requests.get(BASE_API_URL, params=data, timeout=5)
if (resp.status_code != HTTP_OK) or (resp.status_code != 201):
if (resp.status_code != HTTP_OK) or (resp.status_code != 202):
_LOGGER.error("Error %s : %s", resp.status_code, resp.text)