summaryrefslogtreecommitdiff
path: root/obbench
diff options
context:
space:
mode:
Diffstat (limited to 'obbench')
-rwxr-xr-xobbench4
1 files changed, 2 insertions, 2 deletions
diff --git a/obbench b/obbench
index 97fd071..157c1f5 100755
--- a/obbench
+++ b/obbench
@@ -249,7 +249,7 @@ class ObnamBenchmarker(cliapp.Application):
'({ref})</td>\n'.format(
link=self.q(basename),
duration=self.q('%.1f' % step['duration']),
- ref=step['reference']))
+ ref=step.get('reference', 0)))
f.write('</tr>\n')
f.write('</table>\n')
@@ -338,7 +338,7 @@ class ObnamBenchmarker(cliapp.Application):
return (obj['date'], obj['commit_id'])
def total(obj, field):
- return sum(step[field] for step in obj['steps'])
+ return sum(step.get(field, 0) for step in obj['steps'])
sorted_objs = []
for obj in objs: