]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/blame - src/patches/ddns-system-Catch-exception-when-host-is-not-dual-stacked.patch
Merge branch 'next'
[people/mfischer/ipfire-2.x.git] / src / patches / ddns-system-Catch-exception-when-host-is-not-dual-stacked.patch
CommitLineData
944f916f
PM
1From de57b2caf44bf10de72e42a20abf690eca50d512 Mon Sep 17 00:00:00 2001
2From: Michael Tremer <michael.tremer@ipfire.org>
3Date: Mon, 4 Apr 2022 10:33:46 +0100
4Subject: [PATCH] system: Catch exception when host is not dual-stacked
5
6This problem seems to have been introduced with an upgrade to Python
73.10.
8
9Reported-by: Adrian Zaugg <ipfire.org@mailgurgler.com>
10Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11---
12 src/ddns/system.py | 6 +++++-
13 1 file changed, 5 insertions(+), 1 deletion(-)
14
15diff --git a/src/ddns/system.py b/src/ddns/system.py
16index 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--
342.30.2
35