aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces/xml/be-mbox-to-xml
diff options
context:
space:
mode:
Diffstat (limited to 'interfaces/xml/be-mbox-to-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/"):