From a98651a101720d00f1fb86422bc9819d36e52ee9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 19 Jun 2007 19:58:44 +0000 Subject: [PATCH] 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 --- pym/output.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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') -- 2.26.2