summaryrefslogtreecommitdiff
path: root/archey3
diff options
context:
space:
mode:
Diffstat (limited to 'archey3')
-rwxr-xr-xarchey312
1 files changed, 8 insertions, 4 deletions
diff --git a/archey3 b/archey3
index 6658b20..7abad8b 100755
--- a/archey3
+++ b/archey3
@@ -209,8 +209,9 @@ class fsDisplay(display):
mount = '/root' if self.arg1 == '/' else self.arg1
title = mount.split('/')[-1].title() + " FS"
try:
- used_ = int(used[:-1]) * self.conversions[used[-1]]
- total_ = int(total[:-1]) * self.conversions[total[-1]]
+ #convert to straight int
+ used_ = int(used[:-1]) * self.conversions[used[-1].upper()]
+ total_ = int(total[:-1]) * self.conversions[total[-1].upper()]
persentage = used_ / total_ * 100
except:
pass
@@ -423,8 +424,11 @@ def screenshot():
subprocess.check_call(['import', '-window', 'root', ctime().replace(' ','_')+'.jpg'])
def render(instance):
- instance.run_command()
- return instance.render()
+ try:
+ instance.run_command()
+ return instance.render()
+ except:
+ return None
#------------ Display object ---------