Skip to content

Commit 2fe201c

Browse files
committed
Print percent complete when building
1 parent c1c1492 commit 2fe201c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/toolchains/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,13 @@ def print_notify(self, event, silent=False):
341341

342342
elif event['type'] == 'progress':
343343
if not silent:
344-
msg = '%s: %s' % (event['action'].title(), basename(event['file']))
344+
if 'percent' in event:
345+
msg = '{} [{:>5.1f}%]: {}'.format(event['action'].title(),
346+
event['percent'],
347+
basename(event['file']))
348+
else:
349+
msg = '{}: {}'.format(event['action'].title(),
350+
basename(event['file']))
345351

346352
if msg:
347353
print msg

0 commit comments

Comments
 (0)