mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 13:06:14 +01:00
Prevent division by zero if no tests
This commit is contained in:
parent
53f70ac43b
commit
08f473ffef
@ -325,7 +325,10 @@ class HTMLReportWriter(ReportWriter):
|
||||
(self.bcounter, self.total_tcounter, self.total_fcounter, self.total_tcounter - self.total_fcounter))
|
||||
self.oprint ('<td align="right">%f</td>\n' % self.total_duration)
|
||||
self.oprint ('<td align="center">-</td>\n')
|
||||
if self.total_tcounter != 0:
|
||||
perc = (self.total_tcounter - self.total_fcounter) * 100.0 / self.total_tcounter
|
||||
else:
|
||||
perc = 0.0
|
||||
pcolor = {
|
||||
100 : 'bgcolor="lightgreen"',
|
||||
0 : 'bgcolor="red"',
|
||||
|
Loading…
Reference in New Issue
Block a user