summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/parser.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/email/parser.py b/Lib/email/parser.py
index 7db4da1..e94d455 100644
--- a/Lib/email/parser.py
+++ b/Lib/email/parser.py
@@ -49,10 +49,7 @@ class Parser:
feedparser = FeedParser(self._class, policy=self.policy)
if headersonly:
feedparser._set_headersonly()
- while True:
- data = fp.read(8192)
- if not data:
- break
+ while data := fp.read(8192):
feedparser.feed(data)
return feedparser.close()