One issue remains:
The constant holdoff_rate_limited_minutes should be overwritable for each provider. For DomainOffensive 30 min ist too short.
>From 312ca7b32852c8b950868423d1919bc2f25031aa Mon Sep 17 00:00:00 2001
From: Dirk Wagner <dirk.wagner(a)ipfire.org>
Date: Thu, 11 May 2017 09:04:49 +0200
Subject: [PATCH] ddns: fixed compile errors
Signed-off-by: Dirk Wagner <dirk.wagner(a)ipfire.org>
---
src/ddns/providers.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index cb6dd2d..5386f35 100644
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -69,7 +69,7 @@ class DDNSProvider(object):
# holdoff time for rate-limited updates - Number of minutes no update
# is tried after the last one has been sent.
- holdoff_rate-limited_minutes = 30
+ holdoff_rate_limited_minutes = 30
# True if the provider is able to remove records, too.
# Required to remove AAAA records if IPv6 is absent again.
@@ -248,10 +248,10 @@ class DDNSProvider(object):
last_update = self.db.last_update(self.hostname, status=last_status)
# Calculate holdoff end, based on the last status (failure or rate-limited)
- if last_status == "failure"
+ if last_status == "failure":
holdoff_end = last_update + datetime.timedelta(days=self.holdoff_failure_days)
else:
- holdoff_end = last_update + datetime.timedelta(minutes=self.holdoff_rate-limited_minutes)
+ holdoff_end = last_update + datetime.timedelta(minutes=self.holdoff_rate_limited_minutes)
now = datetime.datetime.utcnow()
if now < holdoff_end:
--
2.1.4