Compare commits

..

No commits in common. "master" and "v0.0.4" have entirely different histories.

1 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ def ddns_update(host, key, ip):
response.raise_for_status() response.raise_for_status()
if not response_successful(response.text): if not response_successful(response.text):
raise RequestException(f"update to {ip} failed") raise RequestException("update failed")
except RequestException as error: except RequestException as error:
log.error(response.text.strip()) log.error(response.text.strip())
@ -54,7 +54,7 @@ def ddns_update(host, key, ip):
return False return False
log.debug(response.text.strip()) log.debug(response.text.strip())
log.info(f"update to {ip} successful") log.info("update successful")
return True return True
@ -71,8 +71,8 @@ def ddns_update(host, key, ip):
help="The ddns authorization key", help="The ddns authorization key",
) )
def loop_ddns_update(host, key): def loop_ddns_update(host, key):
last_ip = ip_address(socket.getaddrinfo(host, None, socket.AF_INET6)[0][4][0]) last_ip = socket.getaddrinfo(host, None, socket.AF_INET6)[0][4][0]
log.info(f"currently registered address: {last_ip}") log.debug(f"current registered address: {last_ip}")
while True: while True:
current_ip = get_global_ipv6() current_ip = get_global_ipv6()