+ def _OutputErrLines(err_lines, colour):
+ """Output the line of error/warning lines, if not empty
+
+ Also increments self._error_lines if err_lines not empty
+
+ Args:
+ err_lines: List of ErrLine objects, each an error or warning
+ line, possibly including a list of boards with that
+ error/warning
+ colour: Colour to use for output
+ """
+ if err_lines:
+ out_list = []
+ for line in err_lines:
+ boards = ''
+ names = [board.target for board in line.boards]
+ board_str = ' '.join(names) if names else ''
+ if board_str:
+ out = self.col.Color(colour, line.char + '(')
+ out += self.col.Color(self.col.MAGENTA, board_str,
+ bright=False)
+ out += self.col.Color(colour, ') %s' % line.errline)
+ else:
+ out = self.col.Color(colour, line.char + line.errline)
+ out_list.append(out)
+ Print('\n'.join(out_list))
+ self._error_lines += 1
+