summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/rfc822.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index 87d7d39..fc244c5 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -160,7 +160,7 @@ class Message:
else:
self.status = 'Non-header line where header expected'
# Try to undo the read.
- if getattr(self.fp, 'unread'):
+ if hasattr(self.fp, 'unread'):
self.fp.unread(line)
elif self.seekable:
self.fp.seek(-len(line), 1)