Skip to content

Commit

Permalink
fix var unbound (#2245)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Jul 31, 2023
1 parent aebc260 commit 88d33f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions psutil/_pswindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ def swap_memory():
percentswap = cext.swap_percent()
used = int(0.01 * percentswap * total)
else:
percentswap = 0.0
used = 0

free = total - used
percent = round(percentswap, 1)
return _common.sswap(total, used, free, percent, 0, 0)
Expand Down

0 comments on commit 88d33f7

Please sign in to comment.