(self)
| 180 | self._id: int | None = None |
| 181 | |
| 182 | async def __aiter__(self) -> AsyncIterator[AskFrame]: |
| 183 | from cmdop._transport import _STREAM_END # local import: avoid cycle |
| 184 | |
| 185 | self._id, queue = await self._t._start_stream(self._req) |
| 186 | while True: |
| 187 | item = await queue.get() |
| 188 | if item is _STREAM_END: |
| 189 | return |
| 190 | if isinstance(item, BaseException): |
| 191 | # transport-level failure (core crashed / EOF mid-stream). |
| 192 | raise item |
| 193 | if item.kind == pb.Envelope.KIND_ERROR: |
| 194 | # ask stream's terminal error frame. PIN-gate verdicts surface as |
| 195 | # their typed exception (PinDeniedError / PinTimeoutError). |
| 196 | raise _stream_error(item.error.code or "", item.error.message or "") |
| 197 | yield _frame_from_envelope(item) |
| 198 | |
| 199 | async def pin(self, challenge_id: str, pin: str) -> None: |
| 200 | """Answer a ``pin_required`` frame with the entered connection PIN.""" |
nothing calls this directly
no test coverage detected