projects
/
ddns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aa21a4c
)
Move call to get token to main class.
author
Stefan Schantl
<stefan.schantl@ipfire.org>
Sat, 14 Jun 2014 21:26:04 +0000
(23:26 +0200)
committer
Stefan Schantl
<stefan.schantl@ipfire.org>
Sat, 14 Jun 2014 21:57:39 +0000
(23:57 +0200)
src/ddns/providers.py
patch
|
blob
|
blame
|
history
diff --git
a/src/ddns/providers.py
b/src/ddns/providers.py
index
605b65e
..
cbbeeea
100644
(file)
--- a/
src/ddns/providers.py
+++ b/
src/ddns/providers.py
@@
-115,6
+115,13
@@
class DDNSProvider(object):
def protocols(self):
return self.INFO.get("protocols")
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)
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"
# 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,
def update(self):
data = {
"hostname" : self.hostname,