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


Python OutputLogger.get_patches方法代码示例

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


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

示例1: print_summary

# 需要导入模块: from rebasehelper.base_output import OutputLogger [as 别名]
# 或者: from rebasehelper.base_output.OutputLogger import get_patches [as 别名]
    def print_summary(cls, path):

        """
        Function is used for printing summary informations
        :return:
        """

        for key, value in six.iteritems(OutputLogger.get_summary_info()):
            logger.info("%s %s\n", key, value)

        try:
            LoggerHelper.add_file_handler(logger_report, path)
        except (OSError, IOError):
            raise RebaseHelperError("Can not create results file '%s'" % path)

        type_pkgs = ['old', 'new']
        if OutputLogger.get_patches():
            cls.print_patches(OutputLogger.get_patches(), '\nSummary information about patches:')
        for pkg in type_pkgs:
            type_pkg = OutputLogger.get_build(pkg)
            if type_pkg:
                cls.print_rpms(type_pkg, pkg.capitalize())
                cls.print_build_logs(type_pkg, pkg.capitalize())

        cls.print_pkgdiff_tool()
开发者ID:uhliarik,项目名称:rebase-helper,代码行数:27,代码来源:output_tool.py

示例2: print_summary

# 需要导入模块: from rebasehelper.base_output import OutputLogger [as 别名]
# 或者: from rebasehelper.base_output.OutputLogger import get_patches [as 别名]
    def print_summary(cls, path):

        """
        Function is used for printing summary informations
        :return:
        """

        # First of all we would like to print all
        # summary information
        OutputLogger.set_info_text("Summary output is also available in log:", path)
        logger.info('\n')
        for key, value in six.iteritems(OutputLogger.get_summary_info()):
            logger.info("%s %s\n", key, value)

        try:
            LoggerHelper.add_file_handler(logger_output, path)
        except (OSError, IOError):
            raise RebaseHelperError("Can not create results file '%s'", path)

        type_pkgs = ['old', 'new']
        cls.print_patches(OutputLogger.get_patches(), '\nSummary information about patches:')
        for pkg in type_pkgs:
            type_pkg = OutputLogger.get_build(pkg)
            if type_pkg:
                cls.print_rpms(type_pkg, pkg.capitalize())
                cls.print_build_logs(type_pkg, pkg.capitalize())

        cls.print_pkgdiff_tool()
开发者ID:hhorak,项目名称:rebase-helper,代码行数:30,代码来源:output_tool.py

示例3: get_rebased_patches

# 需要导入模块: from rebasehelper.base_output import OutputLogger [as 别名]
# 或者: from rebasehelper.base_output.OutputLogger import get_patches [as 别名]
 def get_rebased_patches(self):
     """
     Function returns a list of patches either
     '': [list_of_deleted_patches]
     :return:
     """
     patches = False
     output_patch_string = []
     if OutputLogger.get_patches():
         for key, val in six.iteritems(OutputLogger.get_patches()):
             if key:
                 output_patch_string.append('Following patches have been %s:\n%s' % (key, val))
                 patches = True
     if not patches:
         output_patch_string.append('Patches were not touched. All were applied properly')
     return output_patch_string
开发者ID:jhornice,项目名称:rebase-helper,代码行数:18,代码来源:application.py

示例4: test_base_output_patches

# 需要导入模块: from rebasehelper.base_output import OutputLogger [as 别名]
# 或者: from rebasehelper.base_output.OutputLogger import get_patches [as 别名]
    def test_base_output_patches(self):
        """
        Test Output logger patches

        :return:
        """
        patch_results = OutputLogger.get_patches()
        expected_patches = self.patches_data
        assert patch_results == expected_patches
开发者ID:hhorak,项目名称:rebase-helper,代码行数:11,代码来源:test_base_output.py


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