config.py 文件源码

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

项目:autocert 作者: mozilla-it 项目源码 文件源码
def _write_config(filename, cfg, roundtrip=False):
    try:
        with open(filename, 'w') as f:
            if roundtrip:
                f.write(yaml.round_trip_dump(dict(cfg), indent=4))
            else:
                f.write(yaml.dump(cfg, indent=4))
    except Exception as ex:
        raise ConfigWriteError(filename, errors=[ex])
    return cfg
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号