refactor(paymentrequest): use f-string in error message
What changed, and why it matters
This commit simply rewrites one error message to use a modern Python string-formatting style (f-string) instead of the older .format() style. It does not change what the program does, what data it handles, or how secure it is.
No security action needed. This is a cosmetic refactor and can be treated as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A single line in electrum/paymentrequest.py was changed from raise Exception("Algorithm not supported: {}".format(algo)) to raise Exception(f"Algorithm not supported: {algo}"). This is a pure code-style refactor with no functional or security impact.
Changed components
electrum/paymentrequest.pyInspect captured patch +1 / −1
diff --git a/electrum/paymentrequest.py b/electrum/paymentrequest.py
index 43fab12..15c7b4b 100644
--- a/electrum/paymentrequest.py
+++ b/electrum/paymentrequest.py
@@ -403,7 +403,7 @@ def verify_cert_chain(chain):
hashBytes = bytearray(hashlib.sha512(data).digest())
verify = pubkey.verify(sig, x509.PREFIX_RSA_SHA512 + hashBytes)
else:
- raise Exception("Algorithm not supported: {}".format(algo))
+ raise Exception(f"Algorithm not supported: {algo}")
if not verify:
raise Exception("Certificate not Signed by Provided CA Certificate Chain")
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.