_ = XLATOR.gettext
ngettext = XLATOR.ngettext
-__version__ = '0.6.3'
+__version__ = '0.6.4'
# =============================================================================
super(BaseDPXApplication, self).post_init()
+ if self.logfile:
+ LOG.debug(_("Using logfile {!r}.").format(str(self.logfile)))
+ else:
+ LOG.debug(_("Don't using a logfile."))
+
# vim: ts=4 et list
from ..xlate import XLATOR
-__version__ = '0.8.6'
+__version__ = '0.8.7'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
LOG.error(msg)
self.exit(1)
- super(PpDeployZonesApp, self).pre_run()
+ LOG.info(_("Starting: {}").format(self.current_timestamp()))
+
+ try:
+ super(PpDeployZonesApp, self).pre_run()
+ except PpPDNSAppError as e:
+ self.exit(5, str(e))
if self.cfg.pdns_instance == 'global':
LOG.error(_(
# -------------------------------------------------------------------------
def _run(self):
- LOG.info(_("Starting: {}").format(self.current_timestamp()))
-
self.get_named_keys()
try:
from . import DPXAppError, BaseDPXApplication
-__version__ = '0.3.2'
+__version__ = '0.3.3'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
if self.verbose > 2:
LOG.debug(_("Got command line arguments:") + '\n' + pp(self.args))
+ super(BaseMailApplication, self).perform_arg_parser()
+
# -------------------------------------------------------------------------
def send_mail(self, subject, body):
# Third party modules
import psutil
+from requests.exceptions import ConnectionError, ReadTimeout, ConnectTimeout
+
# Own modules
from fb_tools import MAX_TIMEOUT
from fb_tools.xlate import format_list
from ..xlate import XLATOR
-__version__ = '0.9.8'
+__version__ = '0.9.9'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
super(PpPDNSApplication, self).init_arg_parser()
# -------------------------------------------------------------------------
- def perform_arg_parser(self):
- """
- Public available method to execute some actions after parsing
- the command line parameters.
- """
- # -------------------------------------------------------------------------
def init_logging(self):
"""Initialize the logger object.
# -------------------------------------------------------------------------
def get_api_server_version(self):
- if not self.pdns:
- raise PpPDNSAppError(_("The PDNS server object does not exists."))
- if not self.pdns.initialized:
- raise PpPDNSAppError(_("The PDNS server object is not initialized."))
+ try:
+ if not self.pdns:
+ raise PpPDNSAppError(_("The PDNS server object does not exists."))
+ if not self.pdns.initialized:
+ raise PpPDNSAppError(_("The PDNS server object is not initialized."))
- return self.pdns.get_api_server_version()
+ return self.pdns.get_api_server_version()
+
+ except (ConnectionError, ReadTimeout, ConnectTimeout) as e:
+ msg = _("Got a {} during evaluating the PDNS server version from API:").format(
+ e.__class__.__name__)
+ msg += ' ' + str(e)
+ raise PpPDNSAppError(msg)
# -------------------------------------------------------------------------
def _build_url(self, path):