From e43bd36618ae26c6a76a981a34a1511ab72d3731 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Thu, 22 Mar 2018 13:23:36 +0200 Subject: [PATCH] More unused variables --- src/class_singleWorker.py | 21 ++++++++++++--------- src/shared.py | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index 45535430..dd56f810 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -70,7 +70,8 @@ class singleWorker(threading.Thread, StoppableThread): ''' WHERE (status='awaitingpubkey' AND folder='sent')''') for row in queryreturn: toAddress, = row - toStatus, toAddressVersionNumber, toStreamNumber, toRipe = \ + # toStatus + _, toAddressVersionNumber, toStreamNumber, toRipe = \ decodeAddress(toAddress) if toAddressVersionNumber <= 3: state.neededPubkeys[toAddress] = 0 @@ -239,8 +240,8 @@ class singleWorker(threading.Thread, StoppableThread): myAddress = addressInKeysFile break""" myAddress = shared.myAddressesByHash[hash] - status, addressVersionNumber, streamNumber, hash = decodeAddress( - myAddress) + # status + _, addressVersionNumber, streamNumber, hash = decodeAddress(myAddress) # 28 days from now plus or minus five minutes TTL = int(28 * 24 * 60 * 60 + helper_random.randomrandrange(-300, 300)) @@ -325,9 +326,9 @@ class singleWorker(threading.Thread, StoppableThread): payload += protocol.getBitfield(myAddress) try: - privSigningKeyHex, privEncryptionKeyHex, \ - pubSigningKey, pubEncryptionKey = self._getKeysForAddress( - myAddress) + # , privEncryptionKeyHex + privSigningKeyHex, _, pubSigningKey, pubEncryptionKey = \ + self._getKeysForAddress(myAddress) except Exception as err: logger.error( 'Error within sendOutOrStoreMyV3Pubkey. Could not read' @@ -469,7 +470,8 @@ class singleWorker(threading.Thread, StoppableThread): for row in queryreturn: fromaddress, subject, body, ackdata, TTL, encoding = row - status, addressVersionNumber, streamNumber, ripe = \ + # status + _, addressVersionNumber, streamNumber, ripe = \ decodeAddress(fromaddress) if addressVersionNumber <= 1: logger.error( @@ -639,8 +641,9 @@ class singleWorker(threading.Thread, StoppableThread): ackdata, status, TTL, retryNumber, encoding = row toStatus, toAddressVersionNumber, toStreamNumber, toRipe = \ decodeAddress(toaddress) - fromStatus, fromAddressVersionNumber, fromStreamNumber, \ - fromRipe = decodeAddress(fromaddress) + # fromStatus, , ,fromRipe + _, fromAddressVersionNumber, fromStreamNumber, _ = \ + decodeAddress(fromaddress) # We may or may not already have the pubkey # for this toAddress. Let's check. diff --git a/src/shared.py b/src/shared.py index 490f4078..37e0e7ee 100644 --- a/src/shared.py +++ b/src/shared.py @@ -154,7 +154,8 @@ def reloadMyAddressHashes(): isEnabled = BMConfigParser().getboolean(addressInKeysFile, 'enabled') if isEnabled: hasEnabledKeys = True - status, addressVersionNumber, streamNumber, hash = \ + # status + _, addressVersionNumber, streamNumber, hash = \ decodeAddress(addressInKeysFile) if addressVersionNumber in (2, 3, 4): # Returns a simple 32 bytes of information encoded