From: Zac Medico Date: Tue, 19 Jun 2007 19:58:44 +0000 (-0000) Subject: For bug #182571, handle curses.error if it's thrown inside get_term_size(). (trunk... X-Git-Tag: v2.1.3~209 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a98651a101720d00f1fb86422bc9819d36e52ee9;p=portage.git For bug #182571, handle curses.error if it's thrown inside get_term_size(). (trunk r6873) svn path=/main/branches/2.1.2/; revision=6874 --- diff --git a/pym/output.py b/pym/output.py index 2f8e63fcd..42e581159 100644 --- a/pym/output.py +++ b/pym/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')