bug
This commit is contained in:
@@ -111,10 +111,12 @@ class Network_controller: # manage id and connection
|
|||||||
if not os.path.exists('addrlist.txt'):
|
if not os.path.exists('addrlist.txt'):
|
||||||
print('addrlist.txt not exists, config that base on addrlist_sample.txt')
|
print('addrlist.txt not exists, config that base on addrlist_sample.txt')
|
||||||
else:
|
else:
|
||||||
with open('addrlist.txt', 'rb') as f:
|
with open('addrlist.txt', 'r') as f:
|
||||||
raw_data = f.read().decode('utf-8')
|
raw_data = f.read()
|
||||||
raw_data = raw_data.replace('\r', '')
|
raw_data = raw_data.replace('\r', '')
|
||||||
lines = raw_data.split('\n')
|
lines = raw_data.split('\n')
|
||||||
|
while '' in lines:
|
||||||
|
lines.remove('')
|
||||||
for line in lines:
|
for line in lines:
|
||||||
ip, port = line.split(':')
|
ip, port = line.split(':')
|
||||||
ip = socket.gethostbyname(ip)
|
ip = socket.gethostbyname(ip)
|
||||||
|
|||||||
Reference in New Issue
Block a user