Skip to content

Commit

Permalink
test: use lstat() instead of stat(follow_symlinks=False)
Browse files Browse the repository at this point in the history
This makes the test compatible with Python 3.9, as the follow_symlinks
keyword was introduced in Python 3.10.

(cherry picked from commit 56cdf81)
  • Loading branch information
mrc0mmand authored and bluca committed Feb 12, 2024
1 parent 713bf2f commit a86f131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test-udev.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def check_add(self) -> None:
print(f'check_add {self.devpath}')

devnode = self.get_devnode()
st = devnode.stat(follow_symlinks=False)
st = devnode.lstat()
assert stat.S_ISCHR(st.st_mode) or stat.S_ISBLK(st.st_mode)
self.check_permissions(st)
self.check_major_minor(st)
Expand Down

0 comments on commit a86f131

Please sign in to comment.