]> git.ipfire.org Git - oddments/ddns.git/commitdiff
Merge remote-tracking branch 'stevee/ddns-fixes'
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 Aug 2014 18:56:42 +0000 (20:56 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 Aug 2014 18:56:42 +0000 (20:56 +0200)
1  2 
src/ddns/providers.py

diff --combined src/ddns/providers.py
index b0443a1a0d77f99a13de4da4851d0339e12fe0ac,48262894e31d88e07e2dc3f631a807672285b364..00a3855bbffab6d61679ccc7614eaac0cef18352
@@@ -214,7 -214,7 +214,7 @@@ class DDNSProtocolDynDNS2(object)
                # Handle error codes.
                if output == "badauth":
                        raise DDNSAuthenticationError
-               elif output == "aduse":
+               elif output == "abuse":
                        raise DDNSAbuseError
                elif output == "notfqdn":
                        raise DDNSRequestError(_("No valid FQDN was given."))
                        raise DDNSInternalServerError
                elif output == "dnserr":
                        raise DDNSInternalServerError(_("DNS error encountered."))
+               elif output == "badagent":
+                       raise DDNSBlockedError
  
                # If we got here, some other update error happened.
                raise DDNSUpdateError(_("Server response: %s") % output)
@@@ -521,11 -523,9 +523,11 @@@ class DDNSProviderDynU(DDNSProtocolDynD
                data = DDNSProtocolDynDNS2._prepare_request_data(self)
  
                # This one supports IPv6
 -              data.update({
 -                      "myipv6"   : self.get_address("ipv6"),
 -              })
 +              myipv6 = self.get_address("ipv6")
 +
 +              # Add update information if we have an IPv6 address.
 +              if myipv6:
 +                      data["myipv6"] = myipv6
  
                return data
  
@@@ -616,7 -616,7 +618,7 @@@ class DDNSProviderEntryDNS(DDNSProvider
  
                # Send update to the server.
                try:
 -                      response = self.send_request(url, method="PUT", data=data)
 +                      response = self.send_request(url, data=data)
  
                # Handle error codes
                except urllib2.HTTPError, e: