Print percent complete when building

pull/2788/head
Jimmy Brisson 2016-09-13 15:27:14 -05:00
parent c1c1492fa7
commit 2fe201cf10
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