mirror of https://github.com/ARMmbed/mbed-os.git
Update event dict with toolchain, use toolchain for wrapping
parent
21f025e601
commit
6b8bde9471
|
@ -66,10 +66,11 @@ def colorstring_to_escapecode(color_string):
|
|||
def print_in_color_notifier (color_map, print_fn):
|
||||
def wrap(event, silent=False):
|
||||
fd = sys.stdout
|
||||
self = event['toolchain']
|
||||
if fd.isatty() and 'severity' in event and event['severity'] in color_map:
|
||||
fd.write(colorstring_to_escapecode(color_map[event['severity']]))
|
||||
print_fn(event, silent)
|
||||
print_fn(self, event, silent)
|
||||
fd.write(colorstring_to_escapecode('default'))
|
||||
else:
|
||||
print_fn(event, silent)
|
||||
print_fn(self, event, silent)
|
||||
return wrap
|
||||
|
|
|
@ -338,7 +338,6 @@ class mbedToolchain:
|
|||
event['severity'] = event['severity'].title()
|
||||
event['file'] = basename(event['file'])
|
||||
event['mcu_name'] = "None"
|
||||
event['toolchain'] = "None"
|
||||
event['target_name'] = event['target_name'].upper() if event['target_name'] else "Unknown"
|
||||
event['toolchain_name'] = event['toolchain_name'].upper() if event['toolchain_name'] else "Unknown"
|
||||
msg = '[%(severity)s] %(target_name)s::%(toolchain_name)s::%(file)s@%(line)s: %(message)s' % event
|
||||
|
@ -351,6 +350,7 @@ class mbedToolchain:
|
|||
def notify(self, event):
|
||||
""" Little closure for notify functions
|
||||
"""
|
||||
event['toolchain'] = self
|
||||
return self.notify_fun(event, self.silent)
|
||||
|
||||
def goanna_parse_line(self, line):
|
||||
|
|
Loading…
Reference in New Issue