diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-19 19:56:49 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-19 19:56:49 +0000 |
commit | a0b317764ed8e5e7511bea040c36cdc94a3f66ab (patch) | |
tree | 3cc943285bc138ceb2735b2a02fb1ff6d94ce016 | |
parent | bd1eb50db206dd721b16dd8e080f2d2d512d53f3 (diff) | |
download | portage-a0b317764ed8e5e7511bea040c36cdc94a3f66ab.tar.gz portage-a0b317764ed8e5e7511bea040c36cdc94a3f66ab.tar.bz2 portage-a0b317764ed8e5e7511bea040c36cdc94a3f66ab.zip |
For bug #182571, handle curses.error if it's thrown inside get_term_size().
svn path=/main/trunk/; revision=6873
-rw-r--r-- | pym/portage/output.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py index a2ed22dc3..bb355f6d7 100644 --- a/pym/portage/output.py +++ b/pym/portage/output.py @@ -258,8 +258,11 @@ def get_term_size(): """ try: import curses - curses.setupterm() - return curses.tigetnum('lines'), curses.tigetnum('cols') + try: + curses.setupterm() + return curses.tigetnum('lines'), curses.tigetnum('cols') + except curses.error: + pass except ImportError: pass st, out = commands.getstatusoutput('stty size') |