cast dict_keys to list before using as shortlist

This commit is contained in:
Victor Shyba 2018-10-01 15:23:50 -03:00
parent 1adce8b227
commit 463cbde4b1

View file

@ -220,7 +220,7 @@ class Node(MockKademliaHelper):
if not bootstrap_contacts:
log.warning("no bootstrap contacts to ping")
ping_result = yield _ping_contacts(bootstrap_contacts)
shortlist = ping_result.keys()
shortlist = list(ping_result.keys())
if not shortlist:
log.warning("failed to ping %i bootstrap contacts", len(bootstrap_contacts))
defer.returnValue(None)