本文整理汇总了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()
示例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()
示例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
示例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