[CalendarServer-changes] [15674] CalendarServer/trunk/calendarserver/tools
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jun 14 22:47:42 PDT 2016
Revision: 15674
http://trac.calendarserver.org//changeset/15674
Author: dre at apple.com
Date: 2016-06-14 22:47:42 -0700 (Tue, 14 Jun 2016)
Log Message:
-----------
The hasattr() test isn't needed; also make the color stuff optional, which satisfies TERM=vt100
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/dashboard.py
CalendarServer/trunk/calendarserver/tools/dashview.py
Modified: CalendarServer/trunk/calendarserver/tools/dashboard.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/dashboard.py 2016-06-15 02:12:33 UTC (rev 15673)
+++ CalendarServer/trunk/calendarserver/tools/dashboard.py 2016-06-15 05:47:42 UTC (rev 15674)
@@ -62,13 +62,12 @@
if useCurses:
def _wrapped(stdscrn):
- if hasattr(curses, 'curs_set'):
- try:
- curses.curs_set(0) # make the cursor invisible
- except:
- pass
- curses.use_default_colors()
- curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)
+ try:
+ curses.curs_set(0) # make the cursor invisible
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)
+ except:
+ pass
d = Dashboard(servers, stdscrn, True)
d.run()
curses.wrapper(_wrapped)
Modified: CalendarServer/trunk/calendarserver/tools/dashview.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/dashview.py 2016-06-15 02:12:33 UTC (rev 15673)
+++ CalendarServer/trunk/calendarserver/tools/dashview.py 2016-06-15 05:47:42 UTC (rev 15674)
@@ -60,13 +60,12 @@
def _wrapped(stdscrn):
- if hasattr(curses, 'curs_set'):
- try:
- curses.curs_set(0) # make the cursor invisible
- except:
- pass
- curses.use_default_colors()
- curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)
+ try:
+ curses.curs_set(0) # make the cursor invisible
+ curses.use_default_colors()
+ curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)
+ except:
+ pass
d = Dashboard(server, stdscrn)
d.run()
curses.wrapper(_wrapped)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160614/9b0d720a/attachment.html>
More information about the calendarserver-changes
mailing list