projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
786a046
)
For bug #182571, handle curses.error if it's thrown inside get_term_size(). (trunk...
author
Zac Medico
<zmedico@gentoo.org>
Tue, 19 Jun 2007 19:58:44 +0000
(19:58 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Tue, 19 Jun 2007 19:58:44 +0000
(19:58 -0000)
svn path=/main/branches/2.1.2/; revision=6874
pym/output.py
patch
|
blob
|
history
diff --git
a/pym/output.py
b/pym/output.py
index 2f8e63fcdbe81d79be2f48501b3d0f27dca8fcf9..42e581159dd05b5543d09ea6b71851964aee986d 100644
(file)
--- 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')