Merge remote-tracking branch 'stevee/fixes'
[oddments/ddns.git] / src / ddns / providers.py
index 766ce64..b0443a1 100644 (file)
@@ -521,9 +521,11 @@ class DDNSProviderDynU(DDNSProtocolDynDNS2, DDNSProvider):
                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
 
@@ -614,7 +616,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: