What changed, and why it matters
This commit corrects a single-word typo in a code comment. The docstring said the function raises KeyError, but the actual code raises NoWireContext. There is no functional code change and no security impact.
Recommended action
No action required; this is a documentation-only typo fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff updates the docstring of get_context() in core/src/trezor/wire/context.py to match the implemented exception type. The runtime behavior is unchanged; only documentation is corrected.
Changed components
core/src/trezor/wire/context.pyInspect captured patch +1 / −1
diff --git a/core/src/trezor/wire/context.py b/core/src/trezor/wire/context.py
index 15c58fee..7f68b3d1 100644
--- a/core/src/trezor/wire/context.py
+++ b/core/src/trezor/wire/context.py
@@ -96,7 +96,7 @@ def get_context() -> Context:
Result of this function should not be stored -- the context is technically allowed
to change inbetween any `await` statements.
- Raises KeyError if there is currently no context.
+ Raises NoWireContext if there is currently no context.
"""
if CURRENT_CONTEXT is None:
raise NoWireContext
Risk score
Our methodology →Why this scored 15/100
Human-validated context
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
No validated notes yet.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.