(self, stream, boundary)
| 594 | """ |
| 595 | |
| 596 | def __init__(self, stream, boundary): |
| 597 | self._stream = stream |
| 598 | self._boundary = boundary |
| 599 | self._done = False |
| 600 | # rollback an additional six bytes because the format is like |
| 601 | # this: CRLF<boundary>[--CRLF] |
| 602 | self._rollback = len(boundary) + 6 |
| 603 | |
| 604 | # Try to use mx fast string search if available. Otherwise |
| 605 | # use Python find. Wrap the latter for consistency. |
| 606 | unused_char = self._stream.read(1) |
| 607 | if not unused_char: |
| 608 | raise InputStreamExhausted() |
| 609 | self._stream.unget(unused_char) |
| 610 | |
| 611 | def __iter__(self): |
| 612 | return self |
nothing calls this directly
no test coverage detected