Simplified HttpRequest.__iter__().

This commit is contained in:
Sergey Fedoseev 2018-07-10 18:13:36 +05:00 committed by Tim Graham
parent e7d7d47b93
commit bcdd9149d4
1 changed files with 1 additions and 5 deletions

View File

@ -346,11 +346,7 @@ class HttpRequest:
raise UnreadablePostError(*e.args) from e
def __iter__(self):
while True:
buf = self.readline()
if not buf:
break
yield buf
return iter(self.readline, b'')
def xreadlines(self):
warnings.warn(