waf: build_summary: don't call size for empty list of nodes

Otherwise, that will cause an error.
This commit is contained in:
Gustavo Jose de Sousa 2016-08-29 18:41:18 -03:00 committed by Lucas De Marchi
parent 71212942da
commit 5d7ca3fd27
1 changed files with 12 additions and 12 deletions

View File

@ -142,20 +142,20 @@ def _build_summary(bld):
filtered_taskgens.append(tg)
taskgens = filtered_taskgens
l = bld.size_summary(nodes)
for i, data in enumerate(l):
taskgens[i].build_summary.update(data)
if nodes:
l = bld.size_summary(nodes)
for i, data in enumerate(l):
taskgens[i].build_summary.update(data)
summary_data_list = [tg.build_summary for tg in taskgens]
print_table(summary_data_list, bld.env.BUILD_SUMMARY_HEADER)
summary_data_list = [tg.build_summary for tg in taskgens]
print_table(summary_data_list, bld.env.BUILD_SUMMARY_HEADER)
if targets_suppressed:
Logs.info('')
Logs.pprint(
'NORMAL',
'Note: Some targets were suppressed. Use --summary-all if you ' +
'want information of all targets.',
)
if targets_suppressed:
Logs.info('')
Logs.pprint(
'NORMAL',
'Note: Some targets were suppressed. Use --summary-all if you want information of all targets.',
)
if hasattr(bld, 'extra_build_summary'):
bld.extra_build_summary(bld, sys.modules[__name__])