from ..xlate import XLATOR
-__version__ = '0.9.9'
+__version__ = '0.9.10'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
PdnsConfiguration.default_pdns_api_port),
)
- help_msg=_(
+ help_msg = _(
"The timeout in seconds for the communication with the PowerDNS-API. "
"Default: {} seconds.").format(PdnsConfiguration.default_pdns_timeout)
pdns_group.add_argument(
self.api_port = self.args.api_port
if self.args.timeout:
+ if self.args.timeout > MAX_TIMEOUT:
+ msg = _("Timeout of {t} seconds too big, at most {m} seconds are allowed.")
+ msg = msg.format(t=self.args.timeout, m=MAX_TIMEOUT)
+ self.exit(1, msg)
+ if self.args.timeout < 0:
+ msg = _("A tomeout may not be negative.")
+ self.exit(1, msg)
self.cfg.pdns_timeout = self.args.timeout
self.pdns = PowerDNSServer(