Exception prevention in hashCount
- I got a report that an exception can occur, and while I can't reproduce it, this should avoid it
This commit is contained in:
parent
c94492f17e
commit
020a78b776
|
@ -49,7 +49,7 @@ class objectHashHolder(threading.Thread):
|
|||
self.collectionOfPeerLists[random.randrange(0, self.size)].append(peerDetails)
|
||||
|
||||
def hashCount(self):
|
||||
return sum([len(x) for x in self.collectionOfHashLists])
|
||||
return sum([len(x) for x in self.collectionOfHashLists if type(x) is list])
|
||||
|
||||
def close(self):
|
||||
self.shutdown = True
|
||||
|
|
Reference in New Issue
Block a user