From: Federico "fox" Scrinzi Date: Sun, 22 Jul 2012 21:52:01 +0000 (-0700) Subject: get_term_size: check if sys.stderr.isatty() X-Git-Tag: v2.2.0_alpha121~34 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b5f4e8956e5b790d5bfcb14b3d9aabe46347e716;p=portage.git get_term_size: check if sys.stderr.isatty() --- diff --git a/pym/portage/output.py b/pym/portage/output.py index 75503917b..c6a7031d0 100644 --- a/pym/portage/output.py +++ b/pym/portage/output.py @@ -434,7 +434,7 @@ def get_term_size(): greater than or equal to zero, since a negative COLUMNS variable is known to prevent some commands from working (see bug #394091). """ - if not sys.stdout.isatty(): + if not (sys.stdout.isatty() or sys.stderr.isatty()): return (0, 0) try: import curses