aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-07-27 15:22:47 -0700
committerZac Medico <zmedico@gentoo.org>2012-07-27 15:22:47 -0700
commiteb828d037bb400f11d0b18a75f7c9ab0559ff737 (patch)
treed48e4bcec6666046065ba0093d628042e966f81c
parentget_term_size: handle temporary stdout overrides (diff)
downloadportage-eb828d037bb400f11d0b18a75f7c9ab0559ff737.tar.gz
portage-eb828d037bb400f11d0b18a75f7c9ab0559ff737.tar.bz2
portage-eb828d037bb400f11d0b18a75f7c9ab0559ff737.zip
get_term_size: pass fd to curses.setupterm()
-rw-r--r--pym/portage/output.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py
index da94377b1..4642a285a 100644
--- a/pym/portage/output.py
+++ b/pym/portage/output.py
@@ -441,7 +441,8 @@ def get_term_size(fd=None):
try:
import curses
try:
- curses.setupterm()
+ curses.setupterm(term=os.environ.get("TERM", "unknown"),
+ fd=fd.fileno())
return curses.tigetnum('lines'), curses.tigetnum('cols')
except curses.error:
pass