summaryrefslogtreecommitdiff
path: root/ttystatus/progressbar.py
diff options
context:
space:
mode:
Diffstat (limited to 'ttystatus/progressbar.py')
-rw-r--r--ttystatus/progressbar.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ttystatus/progressbar.py b/ttystatus/progressbar.py
index 5c5663f..577f0fc 100644
--- a/ttystatus/progressbar.py
+++ b/ttystatus/progressbar.py
@@ -34,10 +34,10 @@ class ProgressBar(ttystatus.Widget):
done = float(self.done)
total = float(self.total)
except ValueError:
- done = 0
- total = 1
+ done = 0.0
+ total = 1.0
if total == 0:
- fraction = 0
+ fraction = 0.0
else:
fraction = done / total
n_stars = int(round(fraction * width))