cert_manager_test.py 文件源码

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

项目:TCP-IP 作者: JackZ0 项目源码 文件源码
def _set_up_config(self, domain, custom_archive):
        # TODO: maybe provide NamespaceConfig.make_dirs?
        # TODO: main() should create those dirs, c.f. #902
        os.makedirs(os.path.join(self.config.live_dir, domain))
        config_file = configobj.ConfigObj()

        if custom_archive is not None:
            os.makedirs(custom_archive)
            config_file["archive_dir"] = custom_archive
        else:
            os.makedirs(os.path.join(self.config.default_archive_dir, domain))

        for kind in ALL_FOUR:
            config_file[kind] = os.path.join(self.config.live_dir, domain,
                                        kind + ".pem")

        config_file.filename = os.path.join(self.config.renewal_configs_dir,
                                       domain + ".conf")
        config_file.write()
        return config_file
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号