]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Fixing lib/pp_admintools/pdns_config.py
authorFrank Brehm <frank@brehm-online.com>
Thu, 31 Mar 2022 09:32:59 +0000 (11:32 +0200)
committerFrank Brehm <frank@brehm-online.com>
Thu, 31 Mar 2022 09:32:59 +0000 (11:32 +0200)
lib/pp_admintools/pdns_config.py

index d31137f3bbfcc135f92c05a0a9e62db1cfef0aaf..d3e1a06546a3f876a0b4f143eb86a46de31feff2 100644 (file)
@@ -34,7 +34,7 @@ from .xlate import XLATOR
 
 LIBRARY_NAME = "pp-pdns-api-client"
 
-__version__ = '0.2.1'
+__version__ = '0.2.2'
 LOG = logging.getLogger(__name__)
 
 _ = XLATOR.gettext
@@ -250,8 +250,10 @@ class PdnsConfiguration(MailConfiguration):
         except (ValueError, TypeError) as e:
             msg = _("Value {!r} for PowerDNS API timeout is invalid:").format(val)
             msg += " " + str(e)
+            if self.raise_on_error:
+                raise PdnsConfigError(msg)
             LOG.error(msg)
-            continue
+            return
 
         self.pdns_timeout = timeout
 
@@ -319,7 +321,7 @@ class PdnsConfiguration(MailConfiguration):
         if val:
             if self.verbose > 2:
                 key_show = '******'
-                self.verbose > 4:
+                if self.verbose > 4:
                     key_show = val
                 msg = _("Found API key for PDNS: {!r}.").format(key_show)
                 LOG.debug(msg)