fix exception in script when no elements are available.
An empty list of cputime/walltime values cause
the value 'None' when transformed into a StatValue.
The code wants to compute sum/avg/... for it some lines later.
@@ -70,6 +70,8 @@ class StatAccumulator(object):
self.walltime_values.append(extract_walltime(result))
def to_latex(self, name_parts):
+ if not self.cputime_values or not self.walltime_values:
+ return ""
cputime_stats = StatValue.from_list(self.cputime_values)
walltime_stats = StatValue.from_list(self.walltime_values)
assert len(name_parts) <= 4
