本文整理汇总了Python中scripts.core.base.Paths.artifact_yaml方法的典型用法代码示例。如果您正苦于以下问题:Python Paths.artifact_yaml方法的具体用法?Python Paths.artifact_yaml怎么用?Python Paths.artifact_yaml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scripts.core.base.Paths
的用法示例。
在下文中一共展示了Paths.artifact_yaml方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_work
# 需要导入模块: from scripts.core.base import Paths [as 别名]
# 或者: from scripts.core.base.Paths import artifact_yaml [as 别名]
from scripts.core.base import Printer
parser.on_parse += Printer.setup_printer
# import os
# Paths.init(os.getcwd())
# run work
with Timer.app_timer:
BinExecutor.register_sigint()
returncode = do_work(parser)
# collect artifact if not set otherwise
# parser.parse()
if parser.simple_options.artifacts:
if parser.simple_options.artifacts is True:
artifact_yml = Paths.artifact_yaml()
else:
artifact_yml = parser.simple_options.artifacts
try:
ap = ArtifactProcessor(artifact_yml)
ap.run()
except Exception as e:
# we catch all error coming from artifact system
# so it does not affect regular tests
pass
if type(returncode) is int:
sys.exit(returncode)
else:
sys.exit(returncode.returncode)