summaryrefslogtreecommitdiff
path: root/django/http/request.py
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2018-07-10 18:13:36 +0500
committerTim Graham <timograham@gmail.com>2018-07-10 09:13:36 -0400
commitbcdd9149d4a887a312e4b0b358eef65a4b5a1ca6 (patch)
treec01fdd4f9a8d06af93692000f6fa07f8bdd20308 /django/http/request.py
parente7d7d47b93d23c8a17ab297d68ec23fa2c543955 (diff)
downloaddjango-bcdd9149d4a887a312e4b0b358eef65a4b5a1ca6.tar.gz
Simplified HttpRequest.__iter__().
Diffstat (limited to 'django/http/request.py')
-rw-r--r--django/http/request.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/django/http/request.py b/django/http/request.py
index 3440e3b95d..4e4447f35f 100644
--- a/django/http/request.py
+++ b/django/http/request.py
@@ -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(