本文整理汇总了Python中rebasehelper.base_output.OutputLogger.clear方法的典型用法代码示例。如果您正苦于以下问题:Python OutputLogger.clear方法的具体用法?Python OutputLogger.clear怎么用?Python OutputLogger.clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rebasehelper.base_output.OutputLogger
的用法示例。
在下文中一共展示了OutputLogger.clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from rebasehelper.base_output import OutputLogger [as 别名]
# 或者: from rebasehelper.base_output.OutputLogger import clear [as 别名]
def __init__(self, cli_conf=None):
"""
Initialize the application
:param cli_conf: CLI object with configuration gathered from commandline
:return:
"""
OutputLogger.clear()
self.conf = cli_conf
if self.conf.verbose:
LoggerHelper.add_stream_handler(logger, logging.DEBUG)
else:
LoggerHelper.add_stream_handler(logger, logging.INFO)
# The directory in which rebase-helper was executed
if self.conf.results_dir is None:
self.execution_dir = os.getcwd()
else:
self.execution_dir = self.conf.results_dir
# Temporary workspace for Builder, checks, ...
self.kwargs['workspace_dir'] = self.workspace_dir = os.path.join(self.execution_dir,
settings.REBASE_HELPER_WORKSPACE_DIR)
# Directory where results should be put
self.kwargs['results_dir'] = self.results_dir = os.path.join(self.execution_dir,
settings.REBASE_HELPER_RESULTS_DIR)
self.kwargs['non_interactive'] = self.conf.non_interactive
# if not continuing, check the results dir
if not self.conf.cont and not self.conf.build_only and not self.conf.comparepkgs:
self._check_results_dir()
# This is used if user executes rebase-helper with --continue
# parameter even when directory does not exist
if not os.path.exists(self.results_dir):
os.makedirs(self.results_dir)
os.makedirs(os.path.join(self.results_dir, settings.REBASE_HELPER_LOGS))
self._add_debug_log_file()
self._add_report_log_file()
logger.debug("Rebase-helper version: %s" % version.VERSION)
if self.conf.build_tasks is None:
self._get_spec_file()
self._prepare_spec_objects()
# check the workspace dir
if not self.conf.cont:
self._check_workspace_dir()
# TODO: Remove the value from kwargs and use only CLI attribute!
self.kwargs['continue'] = self.conf.cont
self._initialize_data()
if self.conf.cont or self.conf.build_only:
self._delete_old_builds()
示例2: __init__
# 需要导入模块: from rebasehelper.base_output import OutputLogger [as 别名]
# 或者: from rebasehelper.base_output.OutputLogger import clear [as 别名]
def __init__(self, cli_conf, execution_dir, debug_log_file, report_log_file):
"""
Initialize the application
:param cli_conf: CLI object with configuration gathered from commandline
:return:
"""
OutputLogger.clear()
self.conf = cli_conf
self.execution_dir = execution_dir
self.debug_log_file = debug_log_file
self.report_log_file = report_log_file
# Temporary workspace for Builder, checks, ...
self.kwargs['workspace_dir'] = self.workspace_dir = os.path.join(self.execution_dir,
settings.REBASE_HELPER_WORKSPACE_DIR)
# Directory where results should be put
self.kwargs['results_dir'] = self.results_dir = os.path.join(self.execution_dir,
settings.REBASE_HELPER_RESULTS_DIR)
self.kwargs['non_interactive'] = self.conf.non_interactive
logger.debug("Rebase-helper version: %s" % version.VERSION)
if self.conf.build_tasks is None:
self._get_spec_file()
self._prepare_spec_objects()
# check the workspace dir
if not self.conf.cont:
self._check_workspace_dir()
# TODO: Remove the value from kwargs and use only CLI attribute!
self.kwargs['continue'] = self.conf.cont
self._initialize_data()
if self.conf.cont or self.conf.build_only:
self._delete_old_builds()