helpers.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:sceptre 作者: cloudreach 项目源码 文件源码
def get_stack_or_env(ctx, path):
    """
    Parses the path to generate relevant Envrionment and Stack object.

    :param ctx: Cli context.
    :type ctx: click.Context
    :param path: Path to either stack config or environment folder.
    :type path: str
    """
    stack = None
    env = None

    config_reader = ConfigReader(ctx.obj["sceptre_dir"], ctx.obj["options"])

    if os.path.splitext(path)[1]:
        stack = config_reader.construct_stack(path)
    else:
        env = config_reader.construct_environment(path)

    return (stack, env)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号