def init_nav_contexts():
try:
# use the obj from the current click context. This is a bit hacky, but works as long as this method is
# invoked in an execution context of click
anchore_config = click.get_current_context().obj
nav = navigator.Navigator(anchore_config=anchore_config, imagelist=imagelist, allimages=contexts['anchore_allimages'])
return nav
except Exception as err:
anchore_print_err("explore operation failed")
success = False
ecode = 1
if not success:
contexts['anchore_allimages'].clear()
sys.exit(ecode)
评论列表
文章目录