diff options
author | Laurie Clark-Michalek <bluepeppers@archlinux.us> | 2011-06-11 12:38:29 +0100 |
---|---|---|
committer | Laurie Clark-Michalek <bluepeppers@archlinux.us> | 2011-06-11 12:38:29 +0100 |
commit | a33c879fdb2015756a448f695abbe5502e5a312e (patch) | |
tree | 5adbab43ae4564d6c74e63ea032ecef80b5d6010 | |
parent | 47501302d9c1055dbf8440bf2bbb2d4e81b5d7a4 (diff) |
Fixed error with conversion from decimal string to int.
-rwxr-xr-x | archey3 | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) |