import psutil
-import requests
+from requests import ConnectionError, ReadTimeout, ConnectTimeout
# Own modules
from .mail import BaseMailApplication, MailAppError
# from ..config.pdns import PdnsConfigError, PdnsConfiguration
from ..xlate import XLATOR
-__version__ = '0.9.13'
+__version__ = '0.10.0'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
# -------------------------------------------------------------------------
def post_run(self):
"""
- Execute this cwafterbefore the main routine.
+ Execute this after the main routine.
Could be overwritten by descendant classes.
"""
return self.pdns.get_api_server_version()
- except (requests.ConnectionError, requests.ReadTimeout, requests.ConnectTimeout) as e:
+ except (ConnectionError, ReadTimeout, ConnectTimeout, PowerDNSHandlerError) as e:
msg = _('Got a {} during evaluating the PDNS server version from API:').format(
e.__class__.__name__)
msg += ' ' + str(e)
#: lib/pp_admintools/app/pdns.py:439
msgid "Got a {} during evaluating the PDNS server version from API:"
-msgstr "Habe in {} bei der Ermittlung der PowerDNS-Serverversion erhalten:"
+msgstr "Habe {} bei der Ermittlung der PowerDNS-Serverversion erhalten:"
#: lib/pp_admintools/app/pdns.py:494
msgid "Trying to get complete information about zone {!r} ..."