mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
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:
committed by
Luca Boccassi
parent
9f177a38ab
commit
56cdf81a72
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user