winstonsee / huhamhire-hosts

Automatically exported from code.google.com/p/huhamhire-hosts
GNU General Public License v3.0
0 stars 0 forks source link

程序在检查custom文件时崩溃 #175

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
您遇到的问题:程序异常崩溃,并且不能正常退出。
1.出问题的地方在qdialog_ui.py中的set_func_list函数,在检查self.cu
stom时出错,具体代码:
       if os.path.isfile(self.custom):
self.custom的直为None,造成异常,因此出错。
通过追查发现是hoststool.py文件中的get_custom_conf_path函数没有正
确的给custom赋值。
个人感觉这个函数实现有些怪异。
path = os.path.expanduser('~/custom.hosts')
if not os.path.isfile(path):
    path = os.path.expanduser('~/custom.hosts')
    + return path
因此我在后面加了个return 
path,程序就正常运行了。但是不知这样改是否符合开发者的�
��意?

您使用的hosts文件版本:今天clone的最新版本
您使用的操作系统:Ubuntu 12.04
您所在的区域(省/市):
您使用的ISP(网络运营商):
网络环境(IPv4/IPv6):

有关问题的其他描述:

Original issue reported on code.google.com by ZhouXuN...@gmail.com on 5 Nov 2014 at 3:44