From: Larry Hastings Date: Sat, 23 Jun 2012 00:01:41 +0000 (-0700) Subject: Issue #14626: Fix buildbot issues on FreeBSD (AMD64). (Fingers crossed.) X-Git-Tag: v3.3.0b1~149 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=90867a5abab7fc866e4cb392c34242b49ea45258;p=python Issue #14626: Fix buildbot issues on FreeBSD (AMD64). (Fingers crossed.) --- diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index ffa58eedc2..a9b13e23c0 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -721,8 +721,13 @@ class PosixTester(unittest.TestCase): posix.utime(support.TESTFN, dir_fd=f, times=(int(now), int((now - int(now)) * 1e9))) + # try dir_fd and follow_symlinks together if os.utime in os.supports_follow_symlinks: - posix.utime(support.TESTFN, follow_symlinks=False, dir_fd=f) + try: + posix.utime(support.TESTFN, follow_symlinks=False, dir_fd=f) + except RuntimeError: + # whoops! using both together not supported on this platform. + pass finally: posix.close(f) diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index ad835aee2b..192923770d 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -296,7 +296,7 @@ class TestShutil(unittest.TestCase): def make_chflags_raiser(err): ex = OSError() - def _chflags_raiser(path, flags): + def _chflags_raiser(path, flags, *, follow_symlinks=True): ex.errno = err raise ex return _chflags_raiser