本文整理汇总了Python中mozharness.base.script.BaseScript.add_failure方法的典型用法代码示例。如果您正苦于以下问题:Python BaseScript.add_failure方法的具体用法?Python BaseScript.add_failure怎么用?Python BaseScript.add_failure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mozharness.base.script.BaseScript
的用法示例。
在下文中一共展示了BaseScript.add_failure方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_failure
# 需要导入模块: from mozharness.base.script import BaseScript [as 别名]
# 或者: from mozharness.base.script.BaseScript import add_failure [as 别名]
def add_failure(self, locale, message, **kwargs):
self.locales_property[locale] = "Failed"
prop_key = "%s_failure" % locale
prop_value = self.query_buildbot_property(prop_key)
if prop_value:
prop_value = "%s %s" % (prop_value, message)
else:
prop_value = message
self.set_buildbot_property(prop_key, prop_value, write_to_file=True)
BaseScript.add_failure(self, locale, message=message, **kwargs)
示例2: _add_failure
# 需要导入模块: from mozharness.base.script import BaseScript [as 别名]
# 或者: from mozharness.base.script.BaseScript import add_failure [as 别名]
def _add_failure(self, locale, message, **kwargs):
"""marks current step as failed"""
self.locales_property[locale] = FAILURE_STR
prop_key = "%s_failure" % locale
prop_value = self.query_buildbot_property(prop_key)
if prop_value:
prop_value = "%s %s" % (prop_value, message)
else:
prop_value = message
self.set_buildbot_property(prop_key, prop_value, write_to_file=True)
BaseScript.add_failure(self, locale, message=message, **kwargs)