aboutsummaryrefslogtreecommitdiff
path: root/lnt/server
diff options
context:
space:
mode:
authorHubert Tong <hubert.reinterpretcast@gmail.com>2019-09-13 20:17:59 +0000
committerHubert Tong <hubert.reinterpretcast@gmail.com>2019-09-13 20:17:59 +0000
commite17846c286a0c9de968ea8593deb0ab2ecfd939a (patch)
tree283f62a626c8daa833872365d467355a06824977 /lnt/server
parentb17dc31ef56dcb3a822f886142f764b0c6689698 (diff)
[LNT] Python 3 support: print statements
Summary: This patch applies `2to3 -f print` fixes, corrects the indentation mangled by `2to3` for multiline print statements, and adds `from __future__ import print_function` to each file that was modified. As requested on review, spaces are then added after commas separating arguments to `print`, separating function call arguments or tuple elements within arguments to `print`, etc. The changes cover the files found to be affected when running tests (without result submission). Reviewers: cmatthews, thopre, kristof.beyls Reviewed By: cmatthews Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D67532 git-svn-id: https://llvm.org/svn/llvm-project/lnt/trunk@371891 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lnt/server')
-rw-r--r--lnt/server/ui/app.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lnt/server/ui/app.py b/lnt/server/ui/app.py
index 5cffe42..98f06c6 100644
--- a/lnt/server/ui/app.py
+++ b/lnt/server/ui/app.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import StringIO
import logging
import logging.handlers
@@ -262,12 +263,12 @@ class App(LNTExceptionLoggerFlask):
rotating.setLevel(logging.DEBUG)
self.logger.addHandler(rotating)
except (OSError, IOError) as e:
- print >> sys.stderr, "Error making log file", \
- LOG_FILENAME, str(e)
- print >> sys.stderr, "Will not log to file."
+ print("Error making log file", \
+ LOG_FILENAME, str(e), file=sys.stderr)
+ print("Will not log to file.", file=sys.stderr)
else:
self.logger.info("Started file logging.")
- print "Logging to :", LOG_FILENAME
+ print("Logging to :", LOG_FILENAME)
else:
self.config['log_file_name'] = log_file_name