Skip to content

Commit

Permalink
Skip the final processing instead for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Sep 8, 2020
1 parent 68a3358 commit 3cf690f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/archiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def compute_updates(self, lid, private, msg):
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
Expand Down Expand Up @@ -406,7 +406,7 @@ def compute_updates(self, lid, private, msg):
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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 3cf690f

Please sign in to comment.