diff options
author | Melik Manukyan <melik@archlinux.us> | 2010-10-04 23:11:41 -0700 |
---|---|---|
committer | Melik Manukyan <melik@archlinux.us> | 2010-10-04 23:11:41 -0700 |
commit | 4b07219fb7f0b22a735da5c1ecef627dd9c08500 (patch) | |
tree | 2148a64df2e21c9988f7ebddeeeb94053100477d | |
parent | 4a64fa86cd9805816d98ab029ba86ee4489ce41c (diff) |
small cleanup
-rw-r--r-- | archey | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -142,7 +142,7 @@ def ram_display(): if usedpercent <= 33: ramdisplay = '%s%s MB %s/ %s MB' % (greenB, used, clear, ram[1]) output('RAM', ramdisplay) - if usedpercentage > 33 and usedpercentage < 67: + if usedpercent > 33 and usedpercentage < 67: ramdisplay = '%s%s MB %s/ %s MB' % (whiteB, used, clear, ram[1]) output('RAM', ramdisplay) if usedpercent >= 67: @@ -285,14 +285,14 @@ def disk_display(): total = p1.splitlines()[-1] used = total.split()[3] size = total.split()[2] - usedpercentage = float(re.sub("[A-Z]", "", used)) / float(re.sub("[A-Z]", "", size)) * 100 - if usedpercentage <= 33: + usedpercent = float(re.sub("[A-Z]", "", used)) / float(re.sub("[A-Z]", "", size)) * 100 + if usedpercent <= 33: fs = '%s%s %s/ %s' % (greenB, used, clear, size) output ('Disk', fs) - if usedpercentage > 33 and usedpercentage < 67: + if usedpercent > 33 and usedpercentage < 67: fs = '%s%s %s/ %s' % (yellowB, used, clear, size) output ('Disk', fs) - if usedpercentage >= 67: + if usedpercent >= 67: fs = '%s%s %s/ %s' % (redB, used, clear, size) output ('Disk', fs) |