From ae3ff8c07e771c49dac431c9c8619105a7981a28 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Sun, 14 Apr 2024 04:39:41 +0300 Subject: [PATCH] Fix outdated exception handlers for singleWorker._getKeysForAddress() --- src/class_singleWorker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index eb5e8406..77583626 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -553,8 +553,7 @@ class singleWorker(StoppableThread): # , privEncryptionKeyHex privSigningKeyHex, _, pubSigningKey, pubEncryptionKey = \ self._getKeysForAddress(fromaddress) - except (configparser.NoSectionError, configparser.NoOptionError) as err: - self.logger.warning("Section or Option did not found: %s", err) + except ValueError: queues.UISignalQueue.put(( 'updateSentItemStatusByAckdata', ( ackdata, @@ -563,6 +562,7 @@ class singleWorker(StoppableThread): "Error! Could not find sender address" " (your address) in the keys.dat file.")) )) + continue except Exception as err: self.logger.error( 'Error within sendBroadcast. Could not read' @@ -1142,8 +1142,7 @@ class singleWorker(StoppableThread): privSigningKeyHex, privEncryptionKeyHex, \ pubSigningKey, pubEncryptionKey = self._getKeysForAddress( fromaddress) - except (configparser.NoSectionError, configparser.NoOptionError) as err: - self.logger.warning("Section or Option did not found: %s", err) + except ValueError: queues.UISignalQueue.put(( 'updateSentItemStatusByAckdata', ( ackdata, @@ -1152,6 +1151,7 @@ class singleWorker(StoppableThread): "Error! Could not find sender address" " (your address) in the keys.dat file.")) )) + continue except Exception as err: self.logger.error( 'Error within sendMsg. Could not read'