dockerproxy.py 文件源码

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

项目:dockerproxy 作者: mdsecresearch 项目源码 文件源码
def restore_config(self):
        config = SafeConfigParser()
        configpath = expanduser("~/.dockerproxy.conf")
        logging.debug("### Checking for config")
        if not os.path.isfile(configpath):
            tkMessageBox.showinfo("Error", "Config file does not exist")
            return

        config.read(configpath)
        # Assuming same for all
        httphandler = config.get('browser','httphandler')

        if self.DEBUG:
            logging.debug("### Setting original configuration")

        LSSetDefaultRoleHandlerForContentType("public.html", 0x00000002, httphandler)
        LSSetDefaultRoleHandlerForContentType("public.xhtml", 0x00000002, httphandler)
        LSSetDefaultHandlerForURLScheme("http", httphandler)
        LSSetDefaultHandlerForURLScheme("https", httphandler)

        sys.exit(0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号