Merge pull request #2788 from theotherjimmy/print-percent

Print percent complete when building
pull/2808/head
Sam Grove 2016-09-24 16:48:03 -05:00 committed by GitHub
commit 28f9b27918
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