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)
评论列表
文章目录