X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Futils.py;h=0e72a063439294a74b735390f2bd1f6c410b3f1c;hp=2fbf70cadcf6c648bd47a1e31fbbef7616de145c;hb=85a5bd538583f33dc63e072cfa4b3b6750958191;hpb=3e76a9c1f1732bc0f9cc0f604ae292b6c71629f2 diff --git a/resources/tools/presentation/utils.py b/resources/tools/presentation/utils.py index 2fbf70cadc..0e72a06343 100644 --- a/resources/tools/presentation/utils.py +++ b/resources/tools/presentation/utils.py @@ -36,7 +36,10 @@ def mean(items): :rtype: float """ - return float(sum(items)) / len(items) + if len(items): + return float(sum(items)) / len(items) + else: + return None def stdev(items):