projects
/
be.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74d1526
)
be-mbox-to-xml handles emails without explicit transfer encodings.
author
W. Trevor King
<wking@drexel.edu>
Tue, 21 Jul 2009 17:24:55 +0000
(13:24 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Tue, 21 Jul 2009 17:24:55 +0000
(13:24 -0400)
interfaces/xml/be-mbox-to-xml
patch
|
blob
|
history
diff --git
a/interfaces/xml/be-mbox-to-xml
b/interfaces/xml/be-mbox-to-xml
index 840a2a62603c4b795d6ada8db8fc7697fbf496fb..75cfd2bc74524304ca99651b99128501ab559221 100755
(executable)
--- a/
interfaces/xml/be-mbox-to-xml
+++ b/
interfaces/xml/be-mbox-to-xml
@@
-74,7
+74,10
@@
def comment_message_to_xml(message, fields=None):
#assert charset == DEFAULT_ENCODING.lower(), \
# u"Unknown charset: %s" % charset
- encoding = message[u'content-transfer-encoding'].lower()
+ if message[u'content-transfer-encoding'] == None:
+ encoding = DEFAULT_ENCODING
+ else:
+ encoding = message[u'content-transfer-encoding'].lower()
body = message.get_payload(decode=True) # attempt to decode
assert body != None, "Unable to decode?"
if fields[u'content-type'].startswith(u"text/"):