]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ddns: Import upstream patch for provider DDNSS.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 2 Dec 2020 09:13:52 +0000 (10:13 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Dec 2020 14:56:44 +0000 (14:56 +0000)
Fixes #12328.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/ddns
src/patches/ddns-011-ddnss-fix-unhandled-exeption-on-update-patch [new file with mode: 0644]
src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch [new file with mode: 0644]

index 0e045ddc4c0d8ef9e72475900933cef6871b6dae..0a71b52eacc9f9197995537f1dca5e59744ba7b5 100644 (file)
--- a/lfs/ddns
+++ b/lfs/ddns
@@ -73,6 +73,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        # Apply upstream patches.
        cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-dyfi-use-https.patch
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch
 
        cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh
        cd $(DIR_APP) && ./configure \
diff --git a/src/patches/ddns-011-ddnss-fix-unhandled-exeption-on-update-patch b/src/patches/ddns-011-ddnss-fix-unhandled-exeption-on-update-patch
new file mode 100644 (file)
index 0000000..95f6391
--- /dev/null
@@ -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":
diff --git a/src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch b/src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch
new file mode 100644 (file)
index 0000000..95f6391
--- /dev/null
@@ -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":