You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2017/01/29 13:51:24 UTC
incubator-ponymail git commit: It's cheaper to check self.html first
Repository: incubator-ponymail
Updated Branches:
refs/heads/master 84eff685e -> 257fb336e
It's cheaper to check self.html first
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/257fb336
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/257fb336
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/257fb336
Branch: refs/heads/master
Commit: 257fb336ef358783f167b44dbd1179d8145f898c
Parents: 84eff68
Author: Sebb <se...@apache.org>
Authored: Sun Jan 29 13:51:10 2017 +0000
Committer: Sebb <se...@apache.org>
Committed: Sun Jan 29 13:51:10 2017 +0000
----------------------------------------------------------------------
tools/archiver.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/257fb336/tools/archiver.py
----------------------------------------------------------------------
diff --git a/tools/archiver.py b/tools/archiver.py
index bf4033b..48c4d22 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -218,12 +218,12 @@ class Archiver(object):
body = subpart.get_payload(decode=True)
if subpart.get_content_type() == 'text/enriched' and not body:
body = subpart.get_payload(decode=True)
- elif subpart.get_content_type() == 'text/html' and self.html and not firstHTML:
+ elif self.html and subpart.get_content_type() == 'text/html' and not firstHTML:
firstHTML = subpart.get_payload(decode=True)
elif part.get_content_type() == 'text/plain' and not body:
body = part.get_payload(decode=True)
- elif part.get_content_type() == 'text/html' and self.html and not firstHTML:
+ elif self.html and part.get_content_type() == 'text/html' and not firstHTML:
firstHTML = part.get_payload(decode=True)
except Exception as err:
print(err)
@@ -231,7 +231,7 @@ class Archiver(object):
body = msg.get_payload(decode=True)
elif msg.get_content_type() == 'text/enriched':
body = msg.get_payload(decode=True)
- elif msg.get_content_type() == 'text/html' and self.html and not firstHTML:
+ elif self.html and msg.get_content_type() == 'text/html' and not firstHTML:
firstHTML = msg.get_payload(decode=True)
# this requires a GPL lib, user will have to install it themselves