diff options
Diffstat (limited to 'archey3')
-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) |