]> granicus.if.org Git - python/commitdiff
Issue #14626: Fix buildbot issues on FreeBSD (AMD64). (Fingers crossed.)
authorLarry Hastings <larry@hastings.org>
Sat, 23 Jun 2012 00:01:41 +0000 (17:01 -0700)
committerLarry Hastings <larry@hastings.org>
Sat, 23 Jun 2012 00:01:41 +0000 (17:01 -0700)
Lib/test/test_posix.py
Lib/test/test_shutil.py

index ffa58eedc2eb46f94ec5625d0bd89737c443d80a..a9b13e23c01e58b7f7288d059b39e128c0690bb7 100644 (file)
@@ -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)
index ad835aee2b278485493fba8c8122e70a90e5014a..192923770df289893d054d6e272740eaa940b300 100644 (file)
@@ -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