Only parse dict result from udp tracker
This commit is contained in:
parent
3e51b888cb
commit
211d68f590
1 changed files with 1 additions and 1 deletions
|
@ -837,7 +837,7 @@ class Site(object):
|
||||||
tracker.poll_once()
|
tracker.poll_once()
|
||||||
tracker.announce(info_hash=hashlib.sha1(self.address).hexdigest(), num_want=num_want, left=431102370)
|
tracker.announce(info_hash=hashlib.sha1(self.address).hexdigest(), num_want=num_want, left=431102370)
|
||||||
back = tracker.poll_once()
|
back = tracker.poll_once()
|
||||||
if back:
|
if back and type(back) is dict:
|
||||||
peers = back["response"]["peers"]
|
peers = back["response"]["peers"]
|
||||||
else:
|
else:
|
||||||
raise Exception("No response")
|
raise Exception("No response")
|
||||||
|
|
Loading…
Reference in a new issue