summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/knotty.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index a63d8b120e..be63e730f0 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -157,6 +157,8 @@ class TerminalFilter(object):
157 new[3] = new[3] & ~termios.ECHO 157 new[3] = new[3] & ~termios.ECHO
158 termios.tcsetattr(fd, termios.TCSADRAIN, new) 158 termios.tcsetattr(fd, termios.TCSADRAIN, new)
159 curses.setupterm() 159 curses.setupterm()
160 if curses.tigetnum("colors") > 2:
161 format.enable_color()
160 self.ed = curses.tigetstr("ed") 162 self.ed = curses.tigetstr("ed")
161 if self.ed: 163 if self.ed:
162 self.cuu = curses.tigetstr("cuu") 164 self.cuu = curses.tigetstr("cuu")
@@ -240,17 +242,15 @@ def main(server, eventHandler, tf = TerminalFilter):
240 console = logging.StreamHandler(sys.stdout) 242 console = logging.StreamHandler(sys.stdout)
241 format_str = "%(levelname)s: %(message)s" 243 format_str = "%(levelname)s: %(message)s"
242 format = bb.msg.BBLogFormatter(format_str) 244 format = bb.msg.BBLogFormatter(format_str)
243 if interactive:
244 format.enable_color()
245 bb.msg.addDefaultlogFilter(console) 245 bb.msg.addDefaultlogFilter(console)
246 console.setFormatter(format) 246 console.setFormatter(format)
247 logger.addHandler(console) 247 logger.addHandler(console)
248 if consolelogfile: 248 if consolelogfile:
249 bb.utils.mkdirhier(os.path.dirname(consolelogfile)) 249 bb.utils.mkdirhier(os.path.dirname(consolelogfile))
250 format = bb.msg.BBLogFormatter(format_str) 250 conlogformat = bb.msg.BBLogFormatter(format_str)
251 consolelog = logging.FileHandler(consolelogfile) 251 consolelog = logging.FileHandler(consolelogfile)
252 bb.msg.addDefaultlogFilter(consolelog) 252 bb.msg.addDefaultlogFilter(consolelog)
253 consolelog.setFormatter(format) 253 consolelog.setFormatter(conlogformat)
254 logger.addHandler(consolelog) 254 logger.addHandler(consolelog)
255 255
256 try: 256 try: