summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurie Clark-Michalek <bluepeppers@archlinux.us>2011-06-11 12:38:29 +0100
committerLaurie Clark-Michalek <bluepeppers@archlinux.us>2011-06-11 12:38:29 +0100
commita33c879fdb2015756a448f695abbe5502e5a312e (patch)
tree5adbab43ae4564d6c74e63ea032ecef80b5d6010
parent47501302d9c1055dbf8440bf2bbb2d4e81b5d7a4 (diff)
Fixed error with conversion from decimal string to int.
-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)