Skip to content
Snippets Groups Projects
Commit 3048ab2e authored by Alan De Smet's avatar Alan De Smet
Browse files

Don't crash if groupedStats missing (ie inspectReport mode)

parent 02a2b968
No related branches found
No related tags found
1 merge request!9Improved report formatting#18
......@@ -117,18 +117,20 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
## list out all of the statistics groups we have
<table>
% for setName in sorted(list(groupedStats)) :
<% dataSet = groupedStats[setName] %>
<tr><th class="l">${setName}</th><th>Both</th><th>File A</th><th>File B</th></tr>
% for statName, statValue in sorted(list(dataSet.items())) :
<tr>
<td class="n">${statName}<%block name="statDocLink"><a href="${runInfo[constants.DOCUMENTATION_PATH_KEY]}">*</a>:</%block></td>
<td class="n">${report.make_formatted_display_string(statValue['both'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['a'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['b'])}</td>
</tr>
% endfor
% endfor
% if groupedStats is not UNDEFINED:
% for setName in sorted(list(groupedStats)) :
<% dataSet = groupedStats[setName] %>
<tr><th class="l">${setName}</th><th>Both</th><th>File A</th><th>File B</th></tr>
% for statName, statValue in sorted(list(dataSet.items())) :
<tr>
<td class="n">${statName}<%block name="statDocLink"><a href="${runInfo[constants.DOCUMENTATION_PATH_KEY]}">*</a>:</%block></td>
<td class="n">${report.make_formatted_display_string(statValue['both'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['a'])}</td>
<td class="n">${report.make_formatted_display_string(statValue['b'])}</td>
</tr>
% endfor
% endfor
% endif
</table>
</%block>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment