projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6712fa
)
figleaf_htmlizer: when all counts are zero, claim 0% instead of 100%, since it probab...
author
Brian Warner
<warner@allmydata.com>
Tue, 1 May 2007 18:07:28 +0000
(11:07 -0700)
committer
Brian Warner
<warner@allmydata.com>
Tue, 1 May 2007 18:07:28 +0000
(11:07 -0700)
src/allmydata/util/figleaf_htmlizer.py
patch
|
blob
|
history
diff --git
a/src/allmydata/util/figleaf_htmlizer.py
b/src/allmydata/util/figleaf_htmlizer.py
index 15c21cfadfc15877444701ee516b7971541a88d0..579ab5a17e9a36c08dcceeffa1933bef41a56780 100644
(file)
--- a/
src/allmydata/util/figleaf_htmlizer.py
+++ b/
src/allmydata/util/figleaf_htmlizer.py
@@
-108,7
+108,7
@@
def report_as_html(coverage, directory, exclude_patterns=[], root=None):
try:
pcnt = n_covered * 100. / n_lines
except ZeroDivisionError:
- pcnt =
10
0
+ pcnt = 0
info_dict[k] = (n_lines, n_covered, pcnt, display_filename)
html_outfile = make_html_filename(display_filename)
@@
-139,7
+139,7
@@
def report_as_html(coverage, directory, exclude_patterns=[], root=None):
summary_lines = sum([ v[0] for (k, v) in info_dict_items])
summary_cover = sum([ v[1] for (k, v) in info_dict_items])
- summary_pcnt =
10
0
+ summary_pcnt = 0
if summary_lines:
summary_pcnt = float(summary_cover) * 100. / float(summary_lines)