from ..xlate import XLATOR
-__version__ = '2.4.2'
+__version__ = '2.4.3'
LOG = logging.getLogger(__name__)
TZ = pytz.timezone('Europe/Berlin')
return 0
- # -------------------------------------------------------------------------
- def check_for_cobbler_distro(self):
- LOG.debug(_(
- "Checking, whether distro {!r} is available "
- "on the cobbler host.").format(self.cfg.cobbler_distro))
-
- distro_list = self.cobbler.get_distro_list()
- if self.cfg.cobbler_distro not in distro_list:
- msg = _("Did not found distro {!r} on the cobbler host.").format(
- self.cfg.cobbler_distro)
- raise ExpectedHandlerError(msg)
- if self.verbose > 1:
- msg = _("Distro {!r} is available on the cobbler host.").format(
- self.cfg.cobbler_distro)
- LOG.debug(msg)
-
- if not self.cobbler.verify_distro_repos(self.cfg.current_distro):
- msg = _("Not all repos for distro {!r} were found on Cobbler server.").format(
- self.cfg.current_distro.name)
- raise ExpectedHandlerError(msg)
-
# -------------------------------------------------------------------------
def check_for_temp_tpl_vm(self, no_error=False):
# Third party modules
-from fb_tools.common import pp, is_sequence
-from fb_tools.errors import HandlerError
+from fb_tools.errors import ExpectedHandlerError
# Own modules
-
-from .. import print_section_start, print_section_end
-
from ..xlate import XLATOR
-__version__ = '0.1.0'
+__version__ = '0.2.0'
LOG = logging.getLogger(__name__)
A mixin class for extending the CrTplHandler class for Cobbler dependend methods.
"""
- pass
+ # -------------------------------------------------------------------------
+ def check_for_cobbler_distro(self):
+ LOG.debug(_(
+ "Checking, whether distro {!r} is available "
+ "on the cobbler host.").format(self.cfg.cobbler_distro))
+
+ distro_list = self.cobbler.get_distro_list()
+ if self.cfg.cobbler_distro not in distro_list:
+ msg = _("Did not found distro {!r} on the cobbler host.").format(
+ self.cfg.cobbler_distro)
+ raise ExpectedHandlerError(msg)
+ if self.verbose > 1:
+ msg = _("Distro {!r} is available on the cobbler host.").format(
+ self.cfg.cobbler_distro)
+ LOG.debug(msg)
+
+ if not self.cobbler.verify_distro_repos(self.cfg.current_distro):
+ msg = _("Not all repos for distro {!r} were found on Cobbler server.").format(
+ self.cfg.current_distro.name)
+ raise ExpectedHandlerError(msg)
# =============================================================================