commit 0493493911a34221c0bd5913cbd8a97cb9ed18a0
parent 92698a9c6b98aa04191fe40c27190d961fa9673f
Author: tongong <tongong@gmx.net>
Date: Fri, 9 Jul 2021 19:52:43 +0200
fixed division by zero bug
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/timetracker-report b/timetracker-report
@@ -36,7 +36,7 @@ def printGraph(data):
for line in data:
if (line[1] > maximum): maximum = line[1]
for line in data:
- line[1] = round(line[1] / maximum * 50)
+ line[1] = round(line[1] / maximum * 50) if maximum != 0 else 0
# print the graph
for line in data: