projects
/
edward.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
494c6e5
)
only parse header when accessing header fields
author
Andrew Engelbrecht
<sudoman@ninthfloor.org>
Wed, 20 Jan 2016 21:55:16 +0000
(16:55 -0500)
committer
Andrew Engelbrecht
<sudoman@ninthfloor.org>
Wed, 20 Jan 2016 21:55:16 +0000
(16:55 -0500)
this is a simple performance improvement.
edward
patch
|
blob
|
blame
|
history
diff --git
a/edward
b/edward
index 3cbede14511bbf992edf8092d2e9737b681b1432..fd909c634b4ae6077a677847d6d99e40d39fb19a 100755
(executable)
--- a/
edward
+++ b/
edward
@@
-1251,7
+1251,7
@@
def email_to_from_subject (email_bytes):
the email To:, From:, and Subject: fields as strings
"""
- email_struct = email.parser.BytesParser().parsebytes(email_bytes)
+ email_struct = email.parser.Bytes
Header
Parser().parsebytes(email_bytes)
email_to = email_struct['To']
email_from = email_struct['From']