aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/tout.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/patman/tout.py')
-rw-r--r--tools/patman/tout.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/patman/tout.py b/tools/patman/tout.py
index c7e3272..3330526 100644
--- a/tools/patman/tout.py
+++ b/tools/patman/tout.py
@@ -83,7 +83,10 @@ def _Output(level, msg, color=None):
ClearProgress()
if color:
msg = _color.Color(color, msg)
- print(msg)
+ if level < NOTICE:
+ print(msg, file=sys.stderr)
+ else:
+ print(msg)
def DoOutput(level, msg):
"""Output a message to the terminal.
@@ -168,6 +171,7 @@ def Init(_verbose=WARNING, stdout=sys.stdout):
# TODO(sjg): Move this into Chromite libraries when we have them
stdout_is_tty = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()
+ stderr_is_tty = hasattr(sys.stderr, 'isatty') and sys.stderr.isatty()
def Uninit():
ClearProgress()