import psutil
-from requests import ConnectionError, ReadTimeout, ConnectTimeout
+import requests
# Own modules
from .mail import BaseMailApplication, MailAppError
return self.pdns.get_api_server_version()
- except (ConnectionError, ReadTimeout, ConnectTimeout, PowerDNSHandlerError) as e:
+ except (
+ requests.ConnectionError, requests.ReadTimeout,
+ requests.ConnectTimeout, PowerDNSHandlerError) as e:
msg = _('Got a {} during evaluating the PDNS server version from API:').format(
e.__class__.__name__)
msg += ' ' + str(e)