From 795ae88f9688ee2a5fb792680c178a1944a338e7 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 21 Mar 2024 13:58:32 +0100 Subject: [PATCH] v0.2.3 --- setup.cfg | 2 +- src/netcup_dns/main.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 923a674..21f263a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ [metadata] name = netcup-dns -version = 0.2.2 +version = 0.2.3 author = Daniel Langbein author_email = daniel@systemli.org description = Update DNS records with your current external IP address using the netcup DNS API. diff --git a/src/netcup_dns/main.py b/src/netcup_dns/main.py index d88012c..b67fbb0 100644 --- a/src/netcup_dns/main.py +++ b/src/netcup_dns/main.py @@ -241,7 +241,8 @@ def external_ip(version: Type[ipaddress.IPv4Address | ipaddress.IPv6Address], ti # Return IP address as string. return parsed_ip.exploded - raise UnknownIPException('Could not determine public IP address.') + version_str = 'IPv4' if version == ipaddress.IPv4Address else 'IPv6' + raise UnknownIPException(f'Could not determine public {version_str} address.') @lru_cache(maxsize=None)