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 2020/09/08 21:40:26 UTC

[incubator-ponymail] branch master updated: Skip the final processing instead for testing

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git


The following commit(s) were added to refs/heads/master by this push:
     new 3cf690f  Skip the final processing instead for testing
3cf690f is described below

commit 3cf690f6ab23e473542e08c56960fa2117da9e29
Author: Sebb <se...@apache.org>
AuthorDate: Tue Sep 8 22:40:15 2020 +0100

    Skip the final processing instead for testing
---
 tools/archiver.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/archiver.py b/tools/archiver.py
index 99cce8e..5db5f53 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -363,7 +363,7 @@ class Archiver(object): # N.B. Also used by import-mbox.py
         body = self.msgbody(msg)
         saved_body = None # for format=flowed
         try:
-            if not self.skipff and 'content-type' in msg_metadata and msg_metadata['content-type'].find("flowed") != -1:
+            if 'content-type' in msg_metadata and msg_metadata['content-type'].find("flowed") != -1:
                 saved_body = body # so we can redo it properly later
                 # N.B. the convertToWrapped call usually fails, because body is a generally a string here
                 # However sometimes body is bytes at this point in which case it works
@@ -406,7 +406,7 @@ class Archiver(object): # N.B. Also used by import-mbox.py
                 except:
                     irt = ""
 
-            if 'content-type' in msg_metadata and msg_metadata['content-type'].find("flowed") != -1:
+            if not self.skipff and 'content-type' in msg_metadata and msg_metadata['content-type'].find("flowed") != -1:
                 if isinstance(saved_body, str):
                     saved_body = saved_body.encode('utf-8', 'replace')
                 try:
@@ -653,7 +653,7 @@ def main():
     parser.add_argument('--generator', dest='generator',
                        help='Override the generator.')
     parser.add_argument('--skipff', dest = 'skipff', action='store_true',
-                       help = 'Skip format=flowed processing (mainly for unit-testing)')
+                       help = 'Skip final format=flowed processing (mainly for unit-testing)')
     args = parser.parse_args()
 
     if args.verbose: