From: Frantisek Sumsal Date: Fri, 26 Jan 2024 13:28:20 +0000 (+0100) Subject: test: use lstat() instead of stat(follow_symlinks=False) X-Git-Tag: v256-rc1~1026 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56cdf81a72795e15ff7751f62d421b1505b82846;p=thirdparty%2Fsystemd.git 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. --- diff --git a/test/test-udev.py b/test/test-udev.py index 5a95b9c5213..d9d840eb8ce 100755 --- a/test/test-udev.py +++ b/test/test-udev.py @@ -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)