コード例 #1
0
ファイル: decorators.py プロジェクト: amit213/fuel-main
    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
コード例 #2
0
    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