You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2017/09/03 06:37:09 UTC

incubator-ponymail git commit: Reverted the wrong thing, it would seem

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master df0b7ee1c -> 70eda3276


Reverted the wrong thing, it would seem

this is what we agreed on. my bad


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/70eda327
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/70eda327
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/70eda327

Branch: refs/heads/master
Commit: 70eda3276b972d96c099ac85bd05d91123701779
Parents: df0b7ee
Author: Daniel Gruno <hu...@apache.org>
Authored: Sun Sep 3 08:36:41 2017 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Sun Sep 3 08:36:41 2017 +0200

----------------------------------------------------------------------
 tools/generators.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/70eda327/tools/generators.py
----------------------------------------------------------------------
diff --git a/tools/generators.py b/tools/generators.py
index b37fa8b..5d5e1e8 100644
--- a/tools/generators.py
+++ b/tools/generators.py
@@ -56,13 +56,14 @@ def medium(msg, body, lid, attachments):
     attachments - list of attachments (not used)
     """
     # Use text body
-    if not body: # Make sure body is not None, which will fail.
-        body = ""
     xbody = body if type(body) is bytes else body.encode('ascii', 'ignore')
     # Use List ID
     xbody += bytes(lid, encoding='ascii')
     # Use Date header
-    mdate = email.utils.parsedate_tz(msg.get('date'))
+    try:
+        mdate = email.utils.parsedate_tz(msg.get('date'))
+    except:
+        pass
     # In keeping with preserving the past, we have kept this next section(s).
     # For all intents and purposes, this is not a proper way of maintaining
     # a consistent ID in case of missing dates. It is recommended to use