cloudfront.py 文件源码

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

项目:donatemates 作者: donatemates 项目源码 文件源码
def get_code(self):
        """Zip up the code and return bytes

        Returns:
            bytes
        """
        with open(tempfile.NamedTemporaryFile().name, 'w') as zf:
            zfh = zipfile.ZipFile(zf.name, mode='w')

            old_path = os.getcwd()
            os.chdir(os.path.join(resource_filename("manage", "configs")))

            zfh.write("url_rewrite.js")
            zfh.close()
            zf.close()

            os.chdir(old_path)
            with open(zf.name, "rb") as zfr:
                return zfr.read()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号