From: Michael Tremer Date: Mon, 4 Apr 2022 09:33:46 +0000 (+0100) Subject: system: Catch exception when host is not dual-stacked X-Git-Tag: 015~2 X-Git-Url: http://git.ipfire.org/?p=ddns.git;a=commitdiff_plain;h=de57b2caf44bf10de72e42a20abf690eca50d512 system: Catch exception when host is not dual-stacked This problem seems to have been introduced with an upgrade to Python 3.10. Reported-by: Adrian Zaugg Signed-off-by: Michael Tremer --- diff --git a/src/ddns/system.py b/src/ddns/system.py index 73a27a5..48c9a8f 100644 --- a/src/ddns/system.py +++ b/src/ddns/system.py @@ -226,8 +226,12 @@ class DDNSSystem(object): if e.reason.errno == -2: raise DDNSResolveError + # Cannot assign requested address + elif e.reason.errno == 99: + raise DDNSNetworkUnreachableError + # Network Unreachable (e.g. no IPv6 access) - if e.reason.errno == 101: + elif e.reason.errno == 101: raise DDNSNetworkUnreachableError # Connection Refused