summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/output.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py
index bb355f6d7..78d0dcfd2 100644
--- a/pym/portage/output.py
+++ b/pym/portage/output.py
@@ -256,6 +256,8 @@ def get_term_size():
occurs. The curses module is used if available, otherwise the output of
`stty size` is parsed.
"""
+ if not sys.stdout.isatty():
+ return -1, -1
try:
import curses
try: