mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Fixing the file call in the rfc822.Message replacement example.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
from email.parser import Parser
|
||||
|
||||
# If the e-mail headers are in a file, uncomment this line:
|
||||
#headers = Parser().parse(messagefile)
|
||||
#headers = Parser().parse(open(messagefile, 'r'))
|
||||
|
||||
# Or for parsing headers in a string, use:
|
||||
headers = Parser().parsestr('From: <user@example.com>\n'
|
||||
|
||||
Reference in New Issue
Block a user