From eba46261c435b2ae898dd50de664a7f88006fa67 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Sat, 4 Apr 2020 19:05:00 +0200 Subject: scripting: mailmerge.py: remove Python 3.0/3.1 support Change-Id: I934b8f07f99aca1cbc7489f019c905a79acab258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91695 Tested-by: Jenkins Reviewed-by: Michael Stahl --- scripting/source/pyprov/mailmerge.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'scripting') diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index fadceb1e1e56..e41f44d965bd 100644 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -199,14 +199,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): #it's a bytesequence, get raw bytes textbody = textbody.value if sys.version_info >= (3,0): - if sys.version_info <= (3,1): - #http://stackoverflow.com/questions/9403265/how-do-i-use-python-3-2-email-module-to-send-unicode-messages-encoded-in-utf-8-w - #see http://bugs.python.org/16564, etc. basically it now *seems* to be all ok - #in python 3.3.2 onwards, but a little busted in 3.3.0 - - textbody = textbody.decode('iso8859-1') - else: - textbody = textbody.decode('utf-8') + textbody = textbody.decode('utf-8') c = Charset('utf-8') c.body_encoding = QP textmsg.set_payload(textbody, c) -- cgit v1.2.3