From 9be83df144a1675c8e7c9f0962e7e9e61ff767fd Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 25 Nov 2012 21:17:41 +0000 Subject: bitbake: knotty/msg: Avoid usage of curses initscr/endwin to avoid terminal corruption Using curses initscr/endwin causes screen corruption if for example you suspend bitbake and resume it. This changes the code to use a less invasive approach to determining colour availability on the terminal. (Bitbake rev: 4548a8f037eaf8d47a77052acc3e9ec264ac41e0) Signed-off-by: Richard Purdie --- bitbake/lib/bb/msg.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'bitbake/lib/bb/msg.py') diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py index 007c95a4ea..e70daee92f 100644 --- a/bitbake/lib/bb/msg.py +++ b/bitbake/lib/bb/msg.py @@ -106,17 +106,7 @@ class BBLogFormatter(logging.Formatter): return record def enable_color(self): - import curses - try: - win = None - win = curses.initscr() - if curses.has_colors(): - self.color_enabled = True - except: - pass - finally: - if win is not None: - curses.endwin() + self.color_enabled = True class BBLogFilter(object): def __init__(self, handler, level, debug_domains): -- cgit v1.2.3-54-g00ecf