Skip to content

Commit

Permalink
fix syntax err
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 20, 2024
1 parent b6693b9 commit 98ddcff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions psutil/tests/test_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ def free_swap():
_, total, used, free = line.split()
nt = collections.namedtuple('free', 'total used free')
return nt(int(total), int(used), int(free))
raise ValueError(
f"can't find 'Swap' in 'free' output:\n{'\n'.join(lines)}"
)
out = "\n".join(lines)
raise ValueError(f"can't find 'Swap' in 'free' output:\n{out}")


def free_physmem():
Expand All @@ -167,7 +166,8 @@ def free_physmem():
'free', 'total used free shared output'
)
return nt(total, used, free, shared, out)
raise ValueError(f"can't find 'Mem' in 'free' output:\n{'\n'.join(lines)}")
out = "\n".join(lines)
raise ValueError(f"can't find 'Mem' in 'free' output:\n{out}")


def vmstat(stat):
Expand Down

0 comments on commit 98ddcff

Please sign in to comment.