mirror of https://github.com/django/django.git
Simplified HttpRequest.__iter__().
This commit is contained in:
parent
e7d7d47b93
commit
bcdd9149d4
|
@ -346,11 +346,7 @@ class HttpRequest:
|
||||||
raise UnreadablePostError(*e.args) from e
|
raise UnreadablePostError(*e.args) from e
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
while True:
|
return iter(self.readline, b'')
|
||||||
buf = self.readline()
|
|
||||||
if not buf:
|
|
||||||
break
|
|
||||||
yield buf
|
|
||||||
|
|
||||||
def xreadlines(self):
|
def xreadlines(self):
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
|
|
Loading…
Reference in New Issue