Only parse dict result from udp tracker

This commit is contained in:
shortcutme 2018-02-10 01:08:20 +01:00
parent 3e51b888cb
commit 211d68f590
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -837,7 +837,7 @@ class Site(object):
tracker.poll_once()
tracker.announce(info_hash=hashlib.sha1(self.address).hexdigest(), num_want=num_want, left=431102370)
back = tracker.poll_once()
if back:
if back and type(back) is dict:
peers = back["response"]["peers"]
else:
raise Exception("No response")