mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-19 23:43:00 +02:00
ddns: Import upstream patch for provider DDNSS.
Fixes #12328. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
848911b247
commit
882db5cd03
@@ -0,0 +1,30 @@
|
||||
commit 7d0956d14ff8d823551ccd47ccf1492c9da9aac9
|
||||
Author: Stefan Schantl <stefan.schantl@ipfire.org>
|
||||
Date: Mon May 25 18:00:51 2020 +0200
|
||||
|
||||
ProviderDDNSS: Fix unhandled exception on update
|
||||
|
||||
In python > 3.3 the getheader() attribute is not longer part of the
|
||||
urllib.response response.info() object. It is part of response object
|
||||
and so directly can be accessed.
|
||||
|
||||
Fixes #12328
|
||||
|
||||
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
|
||||
|
||||
diff --git a/src/ddns/providers.py b/src/ddns/providers.py
|
||||
index f1fed22..46d8a67 100644
|
||||
--- a/src/ddns/providers.py
|
||||
+++ b/src/ddns/providers.py
|
||||
@@ -642,10 +642,8 @@ class DDNSProviderDDNSS(DDNSProvider):
|
||||
response = self.send_request(self.url, data=data)
|
||||
|
||||
# This provider sends the response code as part of the header.
|
||||
- header = response.info()
|
||||
-
|
||||
# Get status information from the header.
|
||||
- output = header.getheader('ddnss-response')
|
||||
+ output = response.getheader('ddnss-response')
|
||||
|
||||
# Handle success messages.
|
||||
if output == "good" or output == "nochg":
|
||||
@@ -0,0 +1,30 @@
|
||||
commit 7d0956d14ff8d823551ccd47ccf1492c9da9aac9
|
||||
Author: Stefan Schantl <stefan.schantl@ipfire.org>
|
||||
Date: Mon May 25 18:00:51 2020 +0200
|
||||
|
||||
ProviderDDNSS: Fix unhandled exception on update
|
||||
|
||||
In python > 3.3 the getheader() attribute is not longer part of the
|
||||
urllib.response response.info() object. It is part of response object
|
||||
and so directly can be accessed.
|
||||
|
||||
Fixes #12328
|
||||
|
||||
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
|
||||
|
||||
diff --git a/src/ddns/providers.py b/src/ddns/providers.py
|
||||
index f1fed22..46d8a67 100644
|
||||
--- a/src/ddns/providers.py
|
||||
+++ b/src/ddns/providers.py
|
||||
@@ -642,10 +642,8 @@ class DDNSProviderDDNSS(DDNSProvider):
|
||||
response = self.send_request(self.url, data=data)
|
||||
|
||||
# This provider sends the response code as part of the header.
|
||||
- header = response.info()
|
||||
-
|
||||
# Get status information from the header.
|
||||
- output = header.getheader('ddnss-response')
|
||||
+ output = response.getheader('ddnss-response')
|
||||
|
||||
# Handle success messages.
|
||||
if output == "good" or output == "nochg":
|
||||
Reference in New Issue
Block a user