Move call to get token to main class.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 14 Jun 2014 21:26:04 +0000 (23:26 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 14 Jun 2014 21:57:39 +0000 (23:57 +0200)
src/ddns/providers.py

index 605b65e..cbbeeea 100644 (file)
@@ -115,6 +115,13 @@ class DDNSProvider(object):
        def protocols(self):
                return self.INFO.get("protocols")
 
+       @property
+       def token(self):
+               """
+                       Fast access to the token.
+               """
+               return self.get("token")
+
        def __call__(self, force=False):
                if force:
                        logger.info(_("Updating %s forced") % self.hostname)
@@ -370,13 +377,6 @@ class DDNSProviderLightningWireLabs(DDNSProvider):
        # https://dns.lightningwirelabs.com/knowledge-base/api/ddns
        url = "https://dns.lightningwirelabs.com/update"
 
-       @property
-       def token(self):
-               """
-                       Fast access to the token.
-               """
-               return self.get("token")
-
        def update(self):
                data =  {
                        "hostname" : self.hostname,