Browse Source

fix bytes type

dev
破娃酱 8 years ago
parent
commit
0969937fd1
  1. 4
      shadowsocks/asyncdns.py

4
shadowsocks/asyncdns.py

@ -331,8 +331,8 @@ class DNSResolver(object):
with open(etc_path, 'rb') as f: with open(etc_path, 'rb') as f:
for line in f.readlines(): for line in f.readlines():
line = line.strip() line = line.strip()
if "#" in line: if b"#" in line:
line = line[:line.find('#')] line = line[:line.find(b'#')]
parts = line.split() parts = line.split()
if len(parts) >= 2: if len(parts) >= 2:
ip = parts[0] ip = parts[0]

Loading…
Cancel
Save