Handle none case

This commit is contained in:
Bob Mottram 2015-08-31 11:22:38 +01:00
parent 8fd1a50ea7
commit 0a5065c9c2
1 changed files with 4 additions and 2 deletions

View File

@ -591,9 +591,11 @@ class Site:
for node in bootstrap_nodes:
node_fields = node.split(' ')
if len(node_fields) == 3:
protocol = node_fields[0].strip()
protocol = node_fields[0].strip().lower()
ip = node_fields[1].strip()
port = int(node_fields[2].strip())
port = None
if node_fields[2].strip().lower() != "none":
port = int(node_fields[2].strip())
thread = gevent.spawn(self.announceTracker, protocol, ip, port, fileserver_port, address_hash, my_peer_id)
threads.append(thread)
thread.ip = ip