Mercurial > p > roundup > code
diff roundup/backends/portalocker.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 | a76fbb9f5535 |
| children | a50712b6ad56 |
line wrap: on
line diff
--- a/roundup/backends/portalocker.py Sat Jul 21 23:07:16 2018 +1000 +++ b/roundup/backends/portalocker.py Tue Jul 24 09:54:52 2018 +0000 @@ -47,6 +47,7 @@ - Added return result """ +from __future__ import print_function __docformat__ = 'restructuredtext' import os @@ -151,7 +152,7 @@ timestamp = strftime("%m/%d/%Y %H:%M:%S\n", localtime(time())) log.write( timestamp ) - print "Wrote lines. Hit enter to release lock." + print("Wrote lines. Hit enter to release lock.") dummy = sys.stdin.readline() log.close()
