Mercurial > p > roundup > code
diff roundup/mailgw.py @ 5376:64b05e24dbd8
Python 3 preparation: convert print to a function.
Tool-assisted patch. It is possible that some "from __future__ import
print_function" are not in fact needed, if a file only uses print()
with a single string as an argument and so would work fine in Python 2
without that import.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Tue, 24 Jul 2018 09:54:52 +0000 |
| parents | 91954be46a66 |
| children | 35ea9b1efc14 |
line wrap: on
line diff
--- a/roundup/mailgw.py Sat Jul 21 23:07:16 2018 +1000 +++ b/roundup/mailgw.py Tue Jul 24 09:54:52 2018 +0000 @@ -92,6 +92,7 @@ an exception, the original message is bounced back to the sender with the explanatory message given in the exception. """ +from __future__ import print_function __docformat__ = 'restructuredtext' import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -1379,7 +1380,7 @@ password = getpass.getpass() except (KeyboardInterrupt, EOFError): # Ctrl C or D maybe also Ctrl Z under Windows. - print "\nAborted by user." + print("\nAborted by user.") return 1 # open a connection to the server and retrieve all messages try: @@ -1468,7 +1469,7 @@ password = getpass.getpass() except (KeyboardInterrupt, EOFError): # Ctrl C or D maybe also Ctrl Z under Windows. - print "\nAborted by user." + print("\nAborted by user.") return 1 # open a connection to the server and retrieve all messages
