本文整理汇总了Python中paleomix.node.CommandNode._run方法的典型用法代码示例。如果您正苦于以下问题:Python CommandNode._run方法的具体用法?Python CommandNode._run怎么用?Python CommandNode._run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类paleomix.node.CommandNode
的用法示例。
在下文中一共展示了CommandNode._run方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _run
# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.node.CommandNode import _run [as 别名]
def _run(self, config, temp):
try:
CommandNode._run(self, config, temp)
except NodeError, error:
if self._command.join() == [1, None]:
with open(fileutils.reroot_path(temp, "template.stdout")) as handle:
lines = handle.readlines()
if lines and ("Giving up." in lines[-1]):
error = NodeError("%s\n\n%s" % (error, lines[-1]))
raise error
示例2: _run
# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.node.CommandNode import _run [as 别名]
def _run(self, config, temp):
try:
CommandNode._run(self, config, temp)
except NodeError, error:
err_message = "DNA damage levels are too low"
if self._command.join() == [1]:
fpath = os.path.join(temp, "pipe_mapDamage.stdout")
with open(fpath) as handle:
for line in handle:
if err_message in line:
line = line.strip().replace("Warning:", "ERROR:")
error = NodeError("%s\n\n%s" % (error, line))
break
raise error
示例3: test_commandnode_run__call_order
# 需要导入模块: from paleomix.node import CommandNode [as 别名]
# 或者: from paleomix.node.CommandNode import _run [as 别名]
def test_commandnode_run__call_order():
cmd_mock = _build_cmd_mock()
cmd_mock.should_receive("run").with_args("xTMPx").ordered.once
cmd_mock.should_receive("join").with_args().and_return((0,)).ordered.once
node = CommandNode(cmd_mock)
node._run(None, "xTMPx")