aboutsummaryrefslogtreecommitdiffstats
path: root/push.py
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2015-04-12 03:36:11 +0200
committerMarius Halden <marius.h@lden.org>2015-04-12 03:36:11 +0200
commit755b1ce420d9a2f915884e132d67447b88ad2223 (patch)
tree234bac20c6a2f9ef406247e5cf6593ca9bd7b78b /push.py
parentd8c0a39672c14da9240b8dfc97abcf5605d2ebcb (diff)
downloademail2push-755b1ce420d9a2f915884e132d67447b88ad2223.tar.gz
email2push-755b1ce420d9a2f915884e132d67447b88ad2223.tar.bz2
email2push-755b1ce420d9a2f915884e132d67447b88ad2223.tar.xz
Get payload for multipart correctly
Diffstat (limited to 'push.py')
-rwxr-xr-xpush.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/push.py b/push.py
index 1a12f27..27e44a6 100755
--- a/push.py
+++ b/push.py
@@ -80,8 +80,9 @@ if title is not None and encoding is not None:
# Lets at least try to handle mime multipart
if mail.is_multipart():
# Try to find something plain text
- for payload in mail.walk():
- if payload.get_content_type() == 'text/plain':
+ for current in mail.walk():
+ if current.get_content_type() == 'text/plain':
+ payload = get_payload(decode=True)
break
else:
# A realy stupid fallback