From 7954241cdfadfbe12829608090486e2cb4771056 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" Date: Fri, 25 Oct 2019 15:07:45 +0200 Subject: More linting and compatibility --- pykolab/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pykolab/utils.py') diff --git a/pykolab/utils.py b/pykolab/utils.py index 1e5057c..bda7e76 100644 --- a/pykolab/utils.py +++ b/pykolab/utils.py @@ -566,6 +566,7 @@ def translate(mystring, locale_name='en_US'): command = ['/usr/bin/iconv', '-f', 'UTF-8', '-t', 'ASCII//TRANSLIT', '-s'] log.debug(_l("Executing '%s | %s'") % (r"%s" % (mystring), ' '.join(command)), level=8) + process = subprocess.Popen( command, stdout=subprocess.PIPE, @@ -575,7 +576,7 @@ def translate(mystring, locale_name='en_US'): ) try: - print >> process.stdin, r"%s" % mystring + print(r"%s" % (mystring), file=process.stdin) except UnicodeEncodeError: pass -- cgit v1.1