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:
Peter Šurda 2016-11-01 14:44:39 +01:00
parent c94492f17e
commit 020a78b776
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
1 changed files with 1 additions and 1 deletions

View File

@ -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