summaryrefslogtreecommitdiff
path: root/archey3
diff options
context:
space:
mode:
Diffstat (limited to 'archey3')
-rwxr-xr-xarchey37
1 files changed, 4 insertions, 3 deletions
diff --git a/archey3 b/archey3
index 800f12a..801cd11 100755
--- a/archey3
+++ b/archey3
@@ -234,13 +234,14 @@ class fsDisplay(display):
mount = '/root' if self.arg1 == '/' else self.arg1
title = mount.split('/')[-1].title()
try:
- #convert to straight int
- used_ = int(used[:-1]) * conversions[used[-1].upper()]
- total_ = int(total[:-1]) * conversions[total[-1].upper()]
+ #convert to straight float
+ used_ = float(used[:-1]) * conversions[used[-1].upper()]
+ total_ = float(total[:-1]) * conversions[total[-1].upper()]
persentage = used_ / total_ * 100
except Exception as e:
self.logger.error(
"Could not colorize output, errored with {0}".format(e))
+ return
else:
used = self.color_me(used, persentage)