From: Zac Medico Date: Tue, 19 Jun 2007 20:12:13 +0000 (-0000) Subject: Return early from get_term_size() is stdout is not a tty. (trunk r6875) X-Git-Tag: v2.1.3~208 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=db3cd57e16412f5041057d6d689e0c0a8d4e44ec;p=portage.git Return early from get_term_size() is stdout is not a tty. (trunk r6875) svn path=/main/branches/2.1.2/; revision=6876 --- 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: