Fix outdated exception handlers for singleWorker._getKeysForAddress() #2212

Merged
PeterSurda merged 1 commits from gitea-88 into v0.6 2024-04-14 06:23:28 +02:00
Showing only changes of commit ae3ff8c07e - Show all commits

View File

@ -553,8 +553,7 @@ class singleWorker(StoppableThread):
# , privEncryptionKeyHex # , privEncryptionKeyHex
privSigningKeyHex, _, pubSigningKey, pubEncryptionKey = \ privSigningKeyHex, _, pubSigningKey, pubEncryptionKey = \
self._getKeysForAddress(fromaddress) self._getKeysForAddress(fromaddress)
except (configparser.NoSectionError, configparser.NoOptionError) as err: except ValueError:
self.logger.warning("Section or Option did not found: %s", err)
queues.UISignalQueue.put(( queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', ( 'updateSentItemStatusByAckdata', (
ackdata, ackdata,
@ -563,6 +562,7 @@ class singleWorker(StoppableThread):
"Error! Could not find sender address" "Error! Could not find sender address"
" (your address) in the keys.dat file.")) " (your address) in the keys.dat file."))
)) ))
continue
except Exception as err: except Exception as err:
self.logger.error( self.logger.error(
'Error within sendBroadcast. Could not read' 'Error within sendBroadcast. Could not read'
@ -1142,8 +1142,7 @@ class singleWorker(StoppableThread):
privSigningKeyHex, privEncryptionKeyHex, \ privSigningKeyHex, privEncryptionKeyHex, \
pubSigningKey, pubEncryptionKey = self._getKeysForAddress( pubSigningKey, pubEncryptionKey = self._getKeysForAddress(
fromaddress) fromaddress)
except (configparser.NoSectionError, configparser.NoOptionError) as err: except ValueError:
self.logger.warning("Section or Option did not found: %s", err)
queues.UISignalQueue.put(( queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', ( 'updateSentItemStatusByAckdata', (
ackdata, ackdata,
@ -1152,6 +1151,7 @@ class singleWorker(StoppableThread):
"Error! Could not find sender address" "Error! Could not find sender address"
" (your address) in the keys.dat file.")) " (your address) in the keys.dat file."))
)) ))
continue
except Exception as err: except Exception as err:
self.logger.error( self.logger.error(
'Error within sendMsg. Could not read' 'Error within sendMsg. Could not read'