Fixed KeyError in access to background-color map

pull/1094/head
Przemek Wirkus 2015-05-06 13:42:38 +01:00
parent f410b86b05
commit abee10eee8
1 changed files with 6 additions and 4 deletions

View File

@ -100,10 +100,12 @@ class ReportExporter():
RESULT_COLORS = {'OK': 'LimeGreen',
'FAIL': 'Orange',
'ERROR' : 'LightCoral',}
'ERROR': 'LightCoral',
'OTHER': 'LightGray',
}
tooltip_name = self.get_tooltip_name(test['toolchain_name'], test['target_name'], test['test_id'], test_no)
background_color = RESULT_COLORS[test['single_test_result'] if test['single_test_result'] in RESULT_COLORS else 'LightGray']
background_color = RESULT_COLORS[test['single_test_result'] if test['single_test_result'] in RESULT_COLORS else 'OTHER']
result_div_style = "background-color: %s"% background_color
result = """<div class="name" style="%s" onmouseover="show(%s)" onmouseout="hide(%s)">