This commit is contained in:
Daniel Langbein 2024-03-21 13:58:32 +01:00
parent d36d1bea61
commit 795ae88f96
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
2 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@
[metadata] [metadata]
name = netcup-dns name = netcup-dns
version = 0.2.2 version = 0.2.3
author = Daniel Langbein author = Daniel Langbein
author_email = daniel@systemli.org author_email = daniel@systemli.org
description = Update DNS records with your current external IP address using the netcup DNS API. description = Update DNS records with your current external IP address using the netcup DNS API.

View File

@ -241,7 +241,8 @@ def external_ip(version: Type[ipaddress.IPv4Address | ipaddress.IPv6Address], ti
# Return IP address as string. # Return IP address as string.
return parsed_ip.exploded 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) @lru_cache(maxsize=None)