]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch
ddns: Import upstream patch for provider DDNSS.
[people/pmueller/ipfire-2.x.git] / src / patches / ddns-013-ddnss-fix-unhandled-exeption-on-update-patch
CommitLineData
882db5cd
SS
1commit 7d0956d14ff8d823551ccd47ccf1492c9da9aac9
2Author: Stefan Schantl <stefan.schantl@ipfire.org>
3Date: Mon May 25 18:00:51 2020 +0200
4
5 ProviderDDNSS: Fix unhandled exception on update
6
7 In python > 3.3 the getheader() attribute is not longer part of the
8 urllib.response response.info() object. It is part of response object
9 and so directly can be accessed.
10
11 Fixes #12328
12
13 Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
14
15diff --git a/src/ddns/providers.py b/src/ddns/providers.py
16index f1fed22..46d8a67 100644
17--- a/src/ddns/providers.py
18+++ b/src/ddns/providers.py
19@@ -642,10 +642,8 @@ class DDNSProviderDDNSS(DDNSProvider):
20 response = self.send_request(self.url, data=data)
21
22 # This provider sends the response code as part of the header.
23- header = response.info()
24-
25 # Get status information from the header.
26- output = header.getheader('ddnss-response')
27+ output = response.getheader('ddnss-response')
28
29 # Handle success messages.
30 if output == "good" or output == "nochg":