X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;ds=inline;f=income_progress_bars.py;h=8a85a4c5a7402ff791a47a033678f1f6c352d1f7;hb=6115737776cbf6ebd486de1849ea16272cdaff1a;hp=48b1179430326ec4ea1c26ef29a0801b30974fa2;hpb=739e107240a6594839fbd349b972694527589434;p=misc diff --git a/income_progress_bars.py b/income_progress_bars.py index 48b1179..8a85a4c 100644 --- a/income_progress_bars.py +++ b/income_progress_bars.py @@ -1,4 +1,3 @@ -# Python 3 server example from http.server import BaseHTTPRequestHandler, HTTPServer import os import json @@ -215,7 +214,9 @@ class MyServer(BaseHTTPRequestHandler): success = success_income + 0 diff_goal = earned - goal if time_progress >= 0: - success = success_income / time_progress + success = 1 + if time_progress > 0: + success = success_income / time_progress time_progress_indicator = "
" % int(time_progress * 100) return "