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)