diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-09-05 13:28:39 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-09-05 13:28:51 +0200 |
commit | cbde2bc80674ecd27030424f1e125562c97b68bb (patch) | |
tree | a994ecf0febbd0cfae638c27093c771bc99293a3 /test/functional/rpc_setban.py | |
parent | 45be44cce4fa47f2ae8dc8f951e53297a9220088 (diff) | |
parent | fae91a09c453a9a95c382df765bd71e54698d5b2 (diff) | |
download | bitcoin-cbde2bc80674ecd27030424f1e125562c97b68bb.tar.xz |
Merge #16804: test: Remove unused try-block in assert_debug_log
fae91a09c453a9a95c382df765bd71e54698d5b2 test: Remove incorrect and unused try-block in assert_debug_log (MarcoFalke)
Pull request description:
This try block has accidentally been added by me in fa3e9f7627784ee00980590e5bf044a0e1249999.
It was unused all the time, but commit 6011c9d72d1df5c2cd09de6f85c21eb4f7eb1ba8 added a `return` in the finally block, muting all exceptions.
This can be tested by adding an `assert False` after any `with ...assert_debug_log...:` line.
ACKs for top commit:
laanwj:
ACK fae91a09c453a9a95c382df765bd71e54698d5b2
ryanofsky:
utACK fae91a09c453a9a95c382df765bd71e54698d5b2. I didn't know returning inside a `finally` block would cancel pending exceptions or return values, but I guess this makes sense and is a good thing to be aware of.
Tree-SHA512: 47ed0165062060e9af055a3e92f1a529cd41d00476bfad64e3cd141ae084d22f926a343bb1257717e164e15459a59ab66aed198c95d18bf780d8cb0b76aa3298
Diffstat (limited to 'test/functional/rpc_setban.py')
-rwxr-xr-x | test/functional/rpc_setban.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/rpc_setban.py b/test/functional/rpc_setban.py index 423741fd27..b1d2b6f431 100755 --- a/test/functional/rpc_setban.py +++ b/test/functional/rpc_setban.py @@ -26,7 +26,7 @@ class SetBanTests(BitcoinTestFramework): self.nodes[1].setban("127.0.0.1", "add") # Node 0 should not be able to reconnect - with self.nodes[1].assert_debug_log(expected_msgs=['dropped (banned)\n'],timeout=5): + with self.nodes[1].assert_debug_log(expected_msgs=['dropped (banned)\n'], timeout=5): self.restart_node(1, []) self.nodes[0].addnode("127.0.0.1:" + str(p2p_port(1)), "onetry") |