summaryrefslogtreecommitdiffstats
path: root/pym/output.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-19 20:12:13 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-19 20:12:13 +0000
commitdb3cd57e16412f5041057d6d689e0c0a8d4e44ec (patch)
treef6b92a1a20473e6d81007c2f60c93269af523310 /pym/output.py
parenta98651a101720d00f1fb86422bc9819d36e52ee9 (diff)
downloadportage-db3cd57e16412f5041057d6d689e0c0a8d4e44ec.tar.gz
portage-db3cd57e16412f5041057d6d689e0c0a8d4e44ec.tar.bz2
portage-db3cd57e16412f5041057d6d689e0c0a8d4e44ec.zip
Return early from get_term_size() is stdout is not a tty. (trunk r6875)
svn path=/main/branches/2.1.2/; revision=6876
Diffstat (limited to 'pym/output.py')
-rw-r--r--pym/output.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/output.py b/pym/output.py
index 42e581159..ab2227574 100644
--- a/pym/output.py
+++ b/pym/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: