test: use lstat() instead of stat(follow_symlinks=False)

This makes the test compatible with Python 3.9, as the follow_symlinks
keyword was introduced in Python 3.10.
This commit is contained in:
Frantisek Sumsal 2024-01-26 14:28:20 +01:00 committed by Luca Boccassi
parent 9f177a38ab
commit 56cdf81a72

View File

@ -122,7 +122,7 @@ class Device:
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)