[Python-checkins] cpython: Issue #14626: Fix buildbot issues on FreeBSD (AMD64). (Fingers crossed.)

larry.hastings python-checkins at python.org
Sat Jun 23 02:02:13 CEST 2012


http://hg.python.org/cpython/rev/04fd8f77a58e
changeset:   77598:04fd8f77a58e
user:        Larry Hastings <larry at hastings.org>
date:        Fri Jun 22 17:01:41 2012 -0700
summary:
  Issue #14626: Fix buildbot issues on FreeBSD (AMD64).  (Fingers crossed.)

files:
  Lib/test/test_posix.py  |  7 ++++++-
  Lib/test/test_shutil.py |  2 +-
  2 files changed, 7 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -721,8 +721,13 @@
             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
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -296,7 +296,7 @@
         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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list