From 3f4ed2805b0bf1f877a6717e6d15d8d351cc924e Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Mon, 12 Mar 2018 17:36:25 -0700 Subject: Fixed another Python 2.7 dependency. --- Mailman/Handlers/ToDigest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/ToDigest.py b/Mailman/Handlers/ToDigest.py index 046cbaba..15042075 100644 --- a/Mailman/Handlers/ToDigest.py +++ b/Mailman/Handlers/ToDigest.py @@ -72,10 +72,9 @@ def to_cset_out(text, lcset): # Convert text from unicode or lcset to output cset. ocset = Charset(lcset).get_output_charset() or lcset if isinstance(text, unicode): - return text.encode(ocset, errors='replace') + return text.encode(ocset, 'replace') else: - return text.decode(lcset, errors='replace').encode(ocset, - errors='replace') + return text.decode(lcset, 'replace').encode(ocset, 'replace') -- cgit v1.2.3