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 2021/05/15 14:59:18 UTC

[incubator-ponymail-foal] branch master updated: Must use bytes

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-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 1b60049  Must use bytes
1b60049 is described below

commit 1b60049c414635cc8222935a7e57510f51ebd5e5
Author: Sebb <se...@apache.org>
AuthorDate: Sat May 15 15:59:03 2021 +0100

    Must use bytes
---
 tools/plugins/generators_old.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/plugins/generators_old.py b/tools/plugins/generators_old.py
index 69a8a28..cf806e7 100644
--- a/tools/plugins/generators_old.py
+++ b/tools/plugins/generators_old.py
@@ -123,7 +123,7 @@ def cluster(msg, body, lid, attachments, _raw_msg):
     xbody = body if type(body) is bytes else body.encode('utf-8', errors='ignore')
 
     # Crop out any trailing whitespace in body
-    xbody = re.sub(b"\\s+$", b"", xbody)
+    xbody = re.sub(b"\\s+$", b"", xbody) # N.B. must use bytes here
 
     # Use Message-Id (or '' if missing)
     xbody += bytes(msg.get('message-id', ''), encoding='ascii')