From 2e9af7a4a3c15ac9b8b99b6cecfe2578f4f25656 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Mon, 14 May 2018 19:44:54 -0500 Subject: [PATCH] fix thread crash --- onionr/communicator.py | 8 ++++++-- onionr/onionrutils.py | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/onionr/communicator.py b/onionr/communicator.py index 2c66e2ac..5dec7c21 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -492,8 +492,12 @@ class OnionrCommunicate: for i in blockList: if len(i.strip()) == 0: continue - if self._utils.hasBlock(i): - continue + try: + if self._utils.hasBlock(i): + continue + except: + logger.warn('Invalid hash') # TODO: move below validate hash check below + pass if i in self.ignoredHashes: continue diff --git a/onionr/onionrutils.py b/onionr/onionrutils.py index 5c3e59f0..fe2438a1 100644 --- a/onionr/onionrutils.py +++ b/onionr/onionrutils.py @@ -446,7 +446,6 @@ class OnionrUtils: else: logger.warn('Failed to verify hash for %s' % block) - def progressBar(self, value = 0, endvalue = 100, width = None): ''' Outputs a progress bar with a percentage. Write \n after use.