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:
for line in f.readlines():
line = line.strip()
if "#" in line:
line = line[:line.find('#')]
if b"#" in line:
line = line[:line.find(b'#')]
parts = line.split()
if len(parts) >= 2:
ip = parts[0]

Loading…
Cancel
Save