Skip to content

Commit

Permalink
Fix incorrect range for Solaris swap output (giampaolo#1874)
Browse files Browse the repository at this point in the history
  • Loading branch information
jomann09 committed Feb 4, 2021
1 parent e80cabe commit 9552b40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ XXXX-XX-XX
- 1892_: [macOS] psutil.cpu_freq() broken on Apple M1.
- 1904_: [Windows] OpenProcess fails with ERROR_SUCCESS due to GetLastError()
called after sprintf(). (patch by alxchk)
- 1874_: [Solaris] swap output error due to incorrect range.

5.8.0
=====
Expand Down
2 changes: 1 addition & 1 deletion psutil/_pssunos.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def swap_memory():
total = free = 0
for line in lines:
line = line.split()
t, f = line[3:4]
t, f = line[3:5]
total += int(int(t) * 512)
free += int(int(f) * 512)
used = total - free
Expand Down

0 comments on commit 9552b40

Please sign in to comment.