diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-04-01 18:23:23 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-04-01 18:24:30 -0400 |
commit | fa5825d610e92ea0f8abe509516f03ad59e824f3 (patch) | |
tree | 541f4549859a2601f595c7e9bcf23ae6b8503ff3 /test | |
parent | d454e39f2ad31459e3030ce2564dfd20d8c051f2 (diff) | |
parent | ea04bf786263eb0c933648bce43627c0de4d84ef (diff) |
Merge #12284: Remove assigned but never used local variables. Enable Travis checking for unused local variables.
ea04bf7862 Enable flake8 warning F841 ("local variable 'foo' is assigned to but never used") (practicalswift)
169f3e8637 Remove assigned but never used local variables (practicalswift)
Pull request description:
Remove assigned but never used local variables. Enable Travis checking for unused local variables.
Tree-SHA512: d6052ec9044c5d1f03d874ea3c8addd5a156779213ef9200f89d3ae53230f2fd1691aff405c3dae14178e5ef09912c4432e92f606ef4a5220ed9daa140cdee81
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/p2p_segwit.py | 2 | ||||
-rw-r--r-- | test/functional/test_framework/authproxy.py | 2 | ||||
-rw-r--r-- | test/functional/test_framework/blockstore.py | 4 | ||||
-rwxr-xr-x | test/functional/wallet_importmulti.py | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index e6af35fc3d..5546bf6b29 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -833,7 +833,7 @@ class SegWitTest(BitcoinTestFramework): self.test_node.announce_tx_and_wait_for_getdata(tx, timeout=2) self.log.error("Error: duplicate tx getdata!") assert(False) - except AssertionError as e: + except AssertionError: pass # Delivering this transaction with witness should fail (no matter who diff --git a/test/functional/test_framework/authproxy.py b/test/functional/test_framework/authproxy.py index bd3a3b3fab..900090bb66 100644 --- a/test/functional/test_framework/authproxy.py +++ b/test/functional/test_framework/authproxy.py @@ -151,7 +151,7 @@ class AuthServiceProxy(): req_start_time = time.time() try: http_response = self.__conn.getresponse() - except socket.timeout as e: + except socket.timeout: raise JSONRPCException({ 'code': -344, 'message': '%r RPC took longer than %f seconds. Consider ' diff --git a/test/functional/test_framework/blockstore.py b/test/functional/test_framework/blockstore.py index 6067a407cc..6073285a6c 100644 --- a/test/functional/test_framework/blockstore.py +++ b/test/functional/test_framework/blockstore.py @@ -87,7 +87,7 @@ class BlockStore(): block.calc_sha256() try: self.blockDB[repr(block.sha256)] = bytes(block.serialize()) - except TypeError as e: + except TypeError: logger.exception("Unexpected error") self.currentBlock = block.sha256 self.headers_map[block.sha256] = CBlockHeader(block) @@ -147,7 +147,7 @@ class TxStore(): tx.calc_sha256() try: self.txDB[repr(tx.sha256)] = bytes(tx.serialize()) - except TypeError as e: + except TypeError: logger.exception("Unexpected error") def get_transactions(self, inv): diff --git a/test/functional/wallet_importmulti.py b/test/functional/wallet_importmulti.py index 56ebc2622a..91acdb01d0 100755 --- a/test/functional/wallet_importmulti.py +++ b/test/functional/wallet_importmulti.py @@ -230,7 +230,7 @@ class ImportMultiTest (BitcoinTestFramework): sig_address_3 = self.nodes[0].getaddressinfo(self.nodes[0].getnewaddress()) multi_sig_script = self.nodes[0].createmultisig(2, [sig_address_1['pubkey'], sig_address_2['pubkey'], sig_address_3['pubkey']]) self.nodes[1].generate(100) - transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) + self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) self.nodes[1].generate(1) timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['mediantime'] @@ -257,7 +257,7 @@ class ImportMultiTest (BitcoinTestFramework): sig_address_3 = self.nodes[0].getaddressinfo(self.nodes[0].getnewaddress()) multi_sig_script = self.nodes[0].createmultisig(2, [sig_address_1['pubkey'], sig_address_2['pubkey'], sig_address_3['pubkey']]) self.nodes[1].generate(100) - transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) + self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) self.nodes[1].generate(1) timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['mediantime'] @@ -284,7 +284,7 @@ class ImportMultiTest (BitcoinTestFramework): sig_address_3 = self.nodes[0].getaddressinfo(self.nodes[0].getnewaddress()) multi_sig_script = self.nodes[0].createmultisig(2, [sig_address_1['pubkey'], sig_address_2['pubkey'], sig_address_3['pubkey']]) self.nodes[1].generate(100) - transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) + self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) self.nodes[1].generate(1) timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['mediantime'] @@ -311,7 +311,7 @@ class ImportMultiTest (BitcoinTestFramework): sig_address_3 = self.nodes[0].getaddressinfo(self.nodes[0].getnewaddress()) multi_sig_script = self.nodes[0].createmultisig(2, [sig_address_1['pubkey'], sig_address_2['pubkey'], sig_address_3['pubkey']]) self.nodes[1].generate(100) - transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) + self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) self.nodes[1].generate(1) timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['mediantime'] |