dynu: Fix updating if no IPv6 address is available.
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 15 Jul 2014 10:03:43 +0000 (12:03 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 15 Jul 2014 10:03:43 +0000 (12:03 +0200)
src/ddns/providers.py

index aeca64d..4e35a99 100644 (file)
@@ -516,9 +516,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