nodes fix
parent
ce42965672
commit
e35dc7a06d
|
@ -543,11 +543,7 @@ class Libtorrent:
|
||||||
result=result+'Trackers: verified %d/%d, fails=%d' %(verified_sum, len(trackers)-1, fails_sum)
|
result=result+'Trackers: verified %d/%d, fails=%d' %(verified_sum, len(trackers)-1, fails_sum)
|
||||||
if info=='dht_state':
|
if info=='dht_state':
|
||||||
is_dht_running='ON' if self.session.is_dht_running() else 'OFF'
|
is_dht_running='ON' if self.session.is_dht_running() else 'OFF'
|
||||||
try:
|
nodes=0
|
||||||
nodes=self.session.dht_state().get('nodes')
|
|
||||||
except:
|
|
||||||
nodes=self.session.status().get('nodes_num')
|
|
||||||
nodes=len(nodes) if nodes else 0
|
|
||||||
result='DHT: %s (%d)' % (is_dht_running, nodes)
|
result='DHT: %s (%d)' % (is_dht_running, nodes)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue