From a33c879fdb2015756a448f695abbe5502e5a312e Mon Sep 17 00:00:00 2001 From: Laurie Clark-Michalek Date: Sat, 11 Jun 2011 12:38:29 +0100 Subject: Fixed error with conversion from decimal string to int. --- archey3 | 7 ++++--- 1 file 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) -- cgit v1.2.3-54-g00ecf