def wrapper(*args, **kwargs): custom_pkgs = CustomRepo(args[0].environment) try: if settings.CUSTOM_PKGS_MIRROR: custom_pkgs.prepare_repository() except Exception: logger.error("Unable to get custom packages from {0}\n{1}" .format(settings.CUSTOM_PKGS_MIRROR, traceback.format_exc())) raise try: return func(*args, **kwargs) except Exception: custom_pkgs.check_puppet_logs() raise
def wrapper(*args, **kwargs): custom_pkgs = CustomRepo(args[0].environment) try: if settings.CUSTOM_PKGS_MIRROR: custom_pkgs.prepare_repository() except Exception: logger.error("Unable to get custom packages from {0}\n{1}".format( settings.CUSTOM_PKGS_MIRROR, traceback.format_exc())) raise try: return func(*args, **kwargs) except Exception: custom_pkgs.check_puppet_logs() raise