From: Zac Medico Date: Tue, 19 Jun 2007 19:56:49 +0000 (-0000) Subject: For bug #182571, handle curses.error if it's thrown inside get_term_size(). X-Git-Tag: v2.2_pre1~1223 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a0b317764ed8e5e7511bea040c36cdc94a3f66ab;p=portage.git For bug #182571, handle curses.error if it's thrown inside get_term_size(). svn path=/main/trunk/; revision=6873 --- 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')