From 68f546635d5de2ccfedadeabc7bc79e12e5eca6a Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Thu, 24 Jan 2019 21:16:35 -0800 Subject: [PATCH] =?UTF-8?q?test:=20Fix=20=E2=80=9Clocal=20variable=20'e'?= =?UTF-8?q?=20is=20assigned=20to=20but=20never=20used=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit flake8 F841 lints, as of flake8 3.6.0 --- test/functional/feature_assumevalid.py | 2 +- test/functional/test_framework/test_framework.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/functional/feature_assumevalid.py b/test/functional/feature_assumevalid.py index b7814bf33e5..420a3a7688f 100755 --- a/test/functional/feature_assumevalid.py +++ b/test/functional/feature_assumevalid.py @@ -72,7 +72,7 @@ class AssumeValidTest(BitcoinTestFramework): break try: p2p_conn.send_message(msg_block(self.blocks[i])) - except IOError as e: + except IOError: assert not p2p_conn.is_connected break diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index aa674f9ebea..6d580ded477 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -192,18 +192,18 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): self.setup_network() self.run_test() success = TestStatus.PASSED - except JSONRPCException as e: + except JSONRPCException: self.log.exception("JSONRPC error") except SkipTest as e: self.log.warning("Test Skipped: %s" % e.message) success = TestStatus.SKIPPED - except AssertionError as e: + except AssertionError: self.log.exception("Assertion failed") - except KeyError as e: + except KeyError: self.log.exception("Key error") - except Exception as e: + except Exception: self.log.exception("Unexpected exception caught during testing") - except KeyboardInterrupt as e: + except KeyboardInterrupt: self.log.warning("Exiting after keyboard interrupt") if success == TestStatus.FAILED and self.options.pdbonfailure: