aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces/xml
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-21 13:24:55 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-21 13:24:55 -0400
commitec21c8cae10abf14dd429eee484af8dd0b1c4c24 (patch)
tree13abd8145d4d79151a389478fcb7eed8c3d2eb64 /interfaces/xml
parent74d1526226eeb084424ad8bcf333e60c751a6e67 (diff)
downloadbugseverywhere-ec21c8cae10abf14dd429eee484af8dd0b1c4c24.tar.gz
be-mbox-to-xml handles emails without explicit transfer encodings.
Diffstat (limited to 'interfaces/xml')
-rwxr-xr-xinterfaces/xml/be-mbox-to-xml5
1 files changed, 4 insertions, 1 deletions
diff --git a/interfaces/xml/be-mbox-to-xml b/interfaces/xml/be-mbox-to-xml
index 840a2a6..75cfd2b 100755
--- 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/"):