test(core): improve error message on connection error
What changed, and why it matters
This commit only changes a test helper file to print a warning message when a Trezor device connection fails during automated testing. It does not modify the actual firmware, wallet logic, cryptography, or any user-facing security behavior. There is no security issue here.
No action required. This is a benign test-only logging improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies tests/conftest.py to capture the exception object in an except block and log it with LOG.warning instead of silently swallowing it. This is a test infrastructure/debugging improvement with no functional or security impact on the firmware.
Changed components
tests/conftest.pyInspect captured patch +2 / −2
diff --git a/tests/conftest.py b/tests/conftest.py
index e8a453ef..5c5122c9 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -173,8 +173,8 @@ def _find_test_ctx(interact: bool) -> TrezorTestContext:
return TrezorTestContext(
device, auto_interact=not interact, force_wipe=True
)
- except Exception:
- pass
+ except Exception as exc:
+ LOG.warning("%s: %s", device, exc)
raise RuntimeError("No debuggable device found")
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.