Print percent complete when building

pull/2852/head
Jimmy Brisson 2016-09-13 15:27:14 -05:00 committed by Anna Bridge
parent 725352a1e7
commit df71f8e173
1 changed files with 7 additions and 1 deletions

View File

@ -341,7 +341,13 @@ class mbedToolchain:
elif event['type'] == 'progress':
if not silent:
msg = '%s: %s' % (event['action'].title(), basename(event['file']))
if 'percent' in event:
msg = '{} [{:>5.1f}%]: {}'.format(event['action'].title(),
event['percent'],
basename(event['file']))
else:
msg = '{}: {}'.format(event['action'].title(),
basename(event['file']))
if msg:
print msg