Fix route53 depending on broken package (#38079)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-07-22 21:43:51 -07:00
1 parent a756d1e637
commit 2b3f22c871
3 files changed
+4 -11

No files matched your search

+3 -7
View File
@@ -4,7 +4,7 @@ import logging
from typing import List
import boto3
from ipify import exceptions, get_ip
import requests
import voluptuous as vol
from homeassistant.const import CONF_DOMAIN, CONF_TTL, CONF_ZONE, HTTP_OK
@@ -84,16 +84,12 @@ def _update_route53(
# Get the IP Address and build an array of changes
try:
ipaddress = get_ip()
ipaddress = requests.get("https://api.ipify.org/", timeout=5).text()
except exceptions.ConnectionError:
except requests.RequestException:
_LOGGER.warning("Unable to reach the ipify service")
return
except exceptions.ServiceError:
_LOGGER.warning("Unable to complete the ipfy request")
return
changes = []
for record in records:
_LOGGER.debug("Processing record: %s", record)