]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/ddns-system-Catch-exception-when-host-is-not-dual-stacked.patch
hdparm: Fix build with glibc 2.36
[people/pmueller/ipfire-2.x.git] / src / patches / ddns-system-Catch-exception-when-host-is-not-dual-stacked.patch
1 From de57b2caf44bf10de72e42a20abf690eca50d512 Mon Sep 17 00:00:00 2001
2 From: Michael Tremer <michael.tremer@ipfire.org>
3 Date: Mon, 4 Apr 2022 10:33:46 +0100
4 Subject: [PATCH] system: Catch exception when host is not dual-stacked
5
6 This problem seems to have been introduced with an upgrade to Python
7 3.10.
8
9 Reported-by: Adrian Zaugg <ipfire.org@mailgurgler.com>
10 Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 ---
12 src/ddns/system.py | 6 +++++-
13 1 file changed, 5 insertions(+), 1 deletion(-)
14
15 diff --git a/src/ddns/system.py b/src/ddns/system.py
16 index 73a27a5..48c9a8f 100644
17 --- a/src/ddns/system.py
18 +++ b/src/ddns/system.py
19 @@ -226,8 +226,12 @@ class DDNSSystem(object):
20 if e.reason.errno == -2:
21 raise DDNSResolveError
22
23 + # Cannot assign requested address
24 + elif e.reason.errno == 99:
25 + raise DDNSNetworkUnreachableError
26 +
27 # Network Unreachable (e.g. no IPv6 access)
28 - if e.reason.errno == 101:
29 + elif e.reason.errno == 101:
30 raise DDNSNetworkUnreachableError
31
32 # Connection Refused
33 --
34 2.30.2
35