Skip to content

Commit

Permalink
Merge pull request #63 from Kryvochyi/patch-2
Browse files Browse the repository at this point in the history
Fix from getting "ValueError: '{IP}\n' does not appear to be an IPv4 or IPv6 address" error
  • Loading branch information
mietzen authored Sep 20, 2024
2 parents 5e2dcc0 + ff78512 commit e06c01f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions porkbun_ddns/porkbun_ddns.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_public_ips(self) -> list:
with urllib.request.urlopen(url, timeout=10) as response:
if response.getcode() == 200:
public_ips.append(
response.read().decode("utf-8"))
response.read().decode("utf-8")).strip()
break
logger.warning(
"Failed to retrieve IPv4 Address from %s! HTTP status code: %s", url, str(response.code()))
Expand All @@ -85,7 +85,7 @@ def get_public_ips(self) -> list:
with urllib.request.urlopen(url, timeout=10) as response:
if response.getcode() == 200:
public_ips.append(
response.read().decode("utf-8"))
response.read().decode("utf-8")).strip()
break
logger.warning(
"Failed to retrieve IPv6 Address from %s! HTTP status code: %s", url, str(response.code()))
Expand Down

0 comments on commit e06c01f

Please sign in to comment.