MCPcopy
hub / github.com/django/django / __init__

Method __init__

django/http/multipartparser.py:596–609  ·  view source on GitHub ↗
(self, stream, boundary)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

ungetMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected