qa: Silence socket.timeout exception when substituting it for a JSONRPCException
What changed, and why it matters
This is a one-line change in Bitcoin Core's internal test framework. It only affects how error messages are displayed when a test RPC call times out, suppressing an extra Python traceback. It does not change any production code, network behavior, or security logic.
No security action needed. This is a test-framework-only output cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds ‘from None’ to a raise statement in test/functional/test_framework/authproxy.py. This suppresses Python 3’s exception chaining message (‘During handling of the above exception, another exception occurred:’) when a socket.timeout is converted into a JSONRPCException. The change is purely cosmetic for test output and is confined to the QA/test framework.
Changed components
test/functional/test_framework/authproxy.pyInspect captured patch +1 / −1
diff --git a/test/functional/test_framework/authproxy.py b/test/functional/test_framework/authproxy.py
index 0377414a..100372a4 100644
--- a/test/functional/test_framework/authproxy.py
+++ b/test/functional/test_framework/authproxy.py
@@ -169,7 +169,7 @@ class AuthServiceProxy():
'message': '%r RPC took longer than %f seconds. Consider '
'using larger timeout for calls that take '
'longer to return.' % (self._service_name,
- self.__conn.timeout)})
+ self.__conn.timeout)}) from None
if http_response is None:
raise JSONRPCException({
'code': -342, 'message': 'missing HTTP response from server'})
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.