ConfigCommit.py 文件源码

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

项目:lfde 作者: mv-code 项目源码 文件源码
def run(self):

        # we should probably do this somewhere else
        doc = Document()
        lfde = doc.createElement("lfde")
        doc.appendChild(lfde)

        bootscheme = doc.createElement("bootscheme")
        bootscheme.appendChild(doc.createTextNode(self.choices.boot_scheme))
        lfde.appendChild(bootscheme)

        if os.path.exists("/etc/lfde") == False:
            os.makedirs("/etc/lfde")
        config_fh = open("/etc/lfde/config.xml", "w")
        config_fh.write(doc.toprettyxml())
        config_fh.close()

        self.progress_callback(1.0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号