From: Christian Heimes Date: Sun, 23 Jun 2013 14:11:37 +0000 (+0200) Subject: Solaris' /dev/null is a symlink. The device test now uses stat instead of lstat to... X-Git-Tag: v3.4.0a1~417 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fcce2024ea97c76e25adf9ff45f72a9f0d431ac3;p=thirdparty%2FPython%2Fcpython.git Solaris' /dev/null is a symlink. The device test now uses stat instead of lstat to compensate for symlinks. --- fcce2024ea97c76e25adf9ff45f72a9f0d431ac3 diff --cc Lib/test/test_stat.py index 735b2e61aab2,eb3f07a63d33..be0c5c520e7d --- a/Lib/test/test_stat.py +++ b/Lib/test/test_stat.py @@@ -62,9 -58,12 +62,12 @@@ class TestFilemode(unittest.TestCase) pass tearDown = setUp - def get_mode(self, fname=TESTFN): - st_mode = os.lstat(fname).st_mode + def get_mode(self, fname=TESTFN, lstat=True): + if lstat: + st_mode = os.lstat(fname).st_mode + else: + st_mode = os.stat(fname).st_mode - modestr = stat.filemode(st_mode) + modestr = self.statmod.filemode(st_mode) return st_mode, modestr def assertS_IS(self, name, mode):