From fdabb804cf4ade9f18186a30bc52439a98f4372c Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 7 Aug 2018 17:19:25 +0200 Subject: [PATCH] Call print as a function --- cps/asyncmail.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/asyncmail.py b/cps/asyncmail.py index 857ca0d1..a3161c62 100644 --- a/cps/asyncmail.py +++ b/cps/asyncmail.py @@ -44,7 +44,8 @@ class email(smtplib.SMTP): def send(self, str): """Send `str' to the server.""" if self.debuglevel > 0: - print>> sys.stderr, 'send:', repr(str) + from __future__ import print_function + print('send:', repr(str), file=sys.stderr) if hasattr(self, 'sock') and self.sock: try: if self.transferSize: @@ -235,7 +236,7 @@ class StderrLogger(object): def write(self, message): if message == '\n': self.logger.debug(self.buffer) - print self.buffer + print(self.buffer) self.buffer = '' else: self.buffer += message