Skip to content

Commit

Permalink
Merge pull request #52 from JeffCurless/51-percentage-used-on-disk-is…
Browse files Browse the repository at this point in the history
…-incorrect-when-multiple-partitions-are-in-play

Make sure we properly address the percent used.
  • Loading branch information
JeffCurless authored May 2, 2023
2 parents d61fa74 + 83c3a07 commit 6b3d505
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion argonsysinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ def argonsysinfo_listhddusage():

outputobj[curdev]["used"] += int(infolist[2])
outputobj[curdev]["total"] += int(infolist[1])
outputobj[curdev]["percent"] += int(percent)
outputobj[curdev]["percent"] = round(((outputobj[curdev]["used"]/outputobj[curdev]["total"]) * 100),1)
#outputobj[curdev]["percent"] += int(percent)

return outputobj

def argonsysinfo_kbstr(kbval, wholenumbers = True):
Expand Down

0 comments on commit 6b3d505

Please sign in to comment.