Mercurial > bitten > bitten-test
changeset 353:ad18a9a70266
coverage summarizer: entries with no code lines were overwriting the href for the previous entry
author | mgood |
---|---|
date | Fri, 26 May 2006 14:28:37 +0000 |
parents | d1fdda2bf7d1 |
children | 2ffab7963b8d |
files | bitten/trac_ext/summarizers.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/trac_ext/summarizers.py +++ b/bitten/trac_ext/summarizers.py @@ -100,11 +100,12 @@ for unit, file, loc, cov in cursor: loc, cov = int(loc), float(cov) if loc: - data.append({'name': unit, 'loc': loc, 'cov': int(cov)}) + d = {'name': unit, 'loc': loc, 'cov': int(cov)} + if file: + d['href'] = self.env.href.browser(config.path, file) + data.append(d) total_loc += loc total_cov += loc * cov - if file: - data[-1]['href'] = self.env.href.browser(config.path, file) hdf = HDFWrapper(loadpaths=Chrome(self.env).get_all_templates_dirs()) hdf['data'] = data