aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-02-22 09:26:23 +0000
committerfanquake <fanquake@gmail.com>2023-02-22 09:28:09 +0000
commit0c579203d265e4c74a0b1fc33147bf85ef16d56a (patch)
tree3b8b23cbc75f929e81a52555c5c05243743651ff /contrib
parent80f4979322b574be29c684b2e106804432420ebf (diff)
parent61bb4e783b3acc62b121a228f6b14c2462e23315 (diff)
downloadbitcoin-0c579203d265e4c74a0b1fc33147bf85ef16d56a.tar.xz
Merge bitcoin/bitcoin#25867: lint: enable E722 do not use bare except
61bb4e783b3acc62b121a228f6b14c2462e23315 lint: enable E722 do not use bare except (Leonardo Lazzaro) Pull request description: Improve test code and enable E722 lint check. If you want to catch all exceptions that signal program errors, use except Exception: (bare except is equivalent to except BaseException:). Reference: https://peps.python.org/pep-0008/#programming-recommendations ACKs for top commit: MarcoFalke: lgtm ACK 61bb4e783b3acc62b121a228f6b14c2462e23315 Tree-SHA512: c7497769d5745fa02c78a20f4a0e555d8d3996d64af6faf1ce28e22ac1d8be415b98e967294679007b7bda2a9fd04031a9d140b24201e00257ceadeb5c5d7665
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/devtools/security-check.py2
-rwxr-xr-xcontrib/signet/getcoins.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py
index 8377b92736..6cd022ef17 100755
--- a/contrib/devtools/security-check.py
+++ b/contrib/devtools/security-check.py
@@ -34,7 +34,7 @@ def check_ELF_RELRO(binary) -> bool:
flags = binary.get(lief.ELF.DYNAMIC_TAGS.FLAGS)
if flags.value & lief.ELF.DYNAMIC_FLAGS.BIND_NOW:
have_bindnow = True
- except:
+ except Exception:
have_bindnow = False
return have_gnu_relro and have_bindnow
diff --git a/contrib/signet/getcoins.py b/contrib/signet/getcoins.py
index d4e436626f..19751ae269 100755
--- a/contrib/signet/getcoins.py
+++ b/contrib/signet/getcoins.py
@@ -142,7 +142,7 @@ if args.captcha != '': # Retrieve a captcha
try:
res = session.post(args.faucet, data=data)
-except:
+except Exception:
raise SystemExit(f"Unexpected error when contacting faucet: {sys.exc_info()[0]}")
# Display the output as per the returned status code