From: Zac Medico Date: Tue, 19 Jun 2007 20:11:34 +0000 (-0000) Subject: Return early from get_term_size() is stdout is not a tty. X-Git-Tag: v2.2_pre1~1222 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=17403950a6b219af6b919c79998b38172062f93d;p=portage.git Return early from get_term_size() is stdout is not a tty. svn path=/main/trunk/; revision=6875 --- 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: