当前位置: 首页>>代码示例>>Python>>正文


Python LOGGER.error方法代码示例

本文整理汇总了Python中gitbuildsys.log.LOGGER.error方法的典型用法代码示例。如果您正苦于以下问题:Python LOGGER.error方法的具体用法?Python LOGGER.error怎么用?Python LOGGER.error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gitbuildsys.log.LOGGER的用法示例。


在下文中一共展示了LOGGER.error方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: export_sources

# 需要导入模块: from gitbuildsys.log import LOGGER [as 别名]
# 或者: from gitbuildsys.log.LOGGER import error [as 别名]
def export_sources(repo, commit, export_dir, spec, args, create_tarball=True):
    """
    Export packaging files using git-buildpackage
    """
    tmp = utils.Temp(prefix='gbp_', dirn=configmgr.get('tmpdir', 'general'),
                            directory=True)

    gbp_args = create_gbp_export_args(repo, commit, export_dir, tmp.path,
                                      spec, args, create_tarball=create_tarball)
    try:
        ret = gbp_build(gbp_args)
        if ret == 2 and not is_native_pkg(repo, args):
            # Try falling back to old logic of one monolithic tarball
            log.error("Generating upstream tarball and/or generating patches "
                      "failed. GBS tried this as you have upstream branch in "
                      "you git tree. Fix the problem by either:\n"
                      "  1. Update your upstream branch and/or fix the spec "
                      "file. Also, check the upstream tag format.\n"
                      "  2. Remove or rename the upstream branch (change the "
                      "package to native)\n"
                      "See https://source.tizen.org/documentation/reference/"
                      "git-build-system/upstream-package for more details.")
        if ret:
            raise GbsError("Failed to export packaging files from git tree")
    except GitRepositoryError, excobj:
        raise GbsError("Repository error: %s" % excobj)
开发者ID:01org,项目名称:gbs,代码行数:28,代码来源:cmd_export.py

示例2: main

# 需要导入模块: from gitbuildsys.log import LOGGER [as 别名]
# 或者: from gitbuildsys.log.LOGGER import error [as 别名]
def main(args):
    """gbs submit entry point."""

    workdir = args.gitdir

    orphan_packaging = configmgr.get('packaging_branch', 'orphan-devel')
    if orphan_packaging and args.commit == 'HEAD':
        log.error("You seem to be submitting a development branch of an "
                  "(orphan) packaging branch. Please export your changes to"
                  "the packaging branch with 'gbs devel export' and submit"
                  "from there.")
        raise GbsError("Refusing to submit from devel branch")

    message = args.msg
    if message is None:
        message = get_message()

    if not message:
        raise GbsError("tag message is required")

    try:
        repo = RpmGitRepository(workdir)
        commit = repo.rev_parse(args.commit)
        current_branch = repo.get_branch()
    except GitRepositoryError, err:
        raise GbsError(str(err))
开发者ID:jingjingpiggy,项目名称:gbs,代码行数:28,代码来源:cmd_submit.py


注:本文中的gitbuildsys.log.LOGGER.error方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。