[or-cvs] r19551: {arm} Resolved issue that prevented monitor from functioning in te (arm/trunk)
atagar at seul.org
atagar at seul.org
Mon May 25 05:43:58 UTC 2009
Author: atagar
Date: 2009-05-25 01:43:58 -0400 (Mon, 25 May 2009)
New Revision: 19551
Modified:
arm/trunk/armInterface.py
Log:
Resolved issue that prevented monitor from functioning in terminals without curs_set support.
Modified: arm/trunk/armInterface.py
===================================================================
--- arm/trunk/armInterface.py 2009-05-25 05:28:35 UTC (rev 19550)
+++ arm/trunk/armInterface.py 2009-05-25 05:43:58 UTC (rev 19551)
@@ -407,11 +407,14 @@
COLOR_ATTR[name] = curses.color_pair(colorpair)
curses.halfdelay(REFRESH_RATE * 10) # uses getch call as timer for REFRESH_RATE seconds
- curses.curs_set(0) # makes cursor invisible
staticInfo = getStaticInfo(conn)
y, x = stdscr.getmaxyx()
oldX, oldY = -1, -1
+ # attempts to make the cursor invisible (not supported in all terminals)
+ try: curses.curs_set(0)
+ except curses.error: pass
+
# note: subwindows need a character buffer (either in the x or y direction)
# from actual content to prevent crash when shrank
summaryScreen = stdscr.subwin(6, x, 0, 0) # top static content
More information about the tor-commits
mailing list