ebsetenv.py 文件源码

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

项目:cookiecutter-django-reactjs 作者: genomics-geek 项目源码 文件源码
def main():
    if not os.path.exists('.env'):
        print('ERROR!! .env file is missing!')
        print("Please copy 'env.example' to '.env' and add appropriate values")
        exit()
    command = ['eb', 'setenv']
    failures = []
    for key, value in dotenv.Dotenv('.env').items():
        if key.startswith('POSTGRES'):
            print('Skipping POSTGRES values - Amazon RDS provides these')
            continue
        if value:
            command.append("{}={}".format(key, value))
        else:
            failures.append(key)
    if failures:
        for failure in failures:
            print("{} requires a value".format(failure))
    else:
        print(' '.join(command))
        check_call(command)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号