summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-19 20:11:34 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-19 20:11:34 +0000
commit17403950a6b219af6b919c79998b38172062f93d (patch)
treed5219ca27d4b64f0fc372dc7350a472de9bf87ae
parenta0b317764ed8e5e7511bea040c36cdc94a3f66ab (diff)
downloadportage-17403950a6b219af6b919c79998b38172062f93d.tar.gz
portage-17403950a6b219af6b919c79998b38172062f93d.tar.bz2
portage-17403950a6b219af6b919c79998b38172062f93d.zip
Return early from get_term_size() is stdout is not a tty.
svn path=/main/trunk/; revision=6875
-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: