[Python-checkins] cpython (merge 3.2 -> default): Merge from 3.2

antoine.pitrou python-checkins at python.org
Sat Apr 16 18:55:22 CEST 2011


http://hg.python.org/cpython/rev/7323bced3d48
changeset:   69403:7323bced3d48
parent:      69401:8c004b477087
parent:      69402:11c489dc8cbd
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat Apr 16 18:55:16 2011 +0200
summary:
  Merge from 3.2

files:
  Lib/test/regrtest.py |  6 +++++-
  Misc/NEWS            |  2 ++
  2 files changed, 7 insertions(+), 1 deletions(-)


diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -170,6 +170,7 @@
 import io
 import sys
 import time
+import errno
 import traceback
 import warnings
 import unittest
@@ -1569,8 +1570,11 @@
     if sysconfig.is_python_build():
         TEMPDIR = os.path.join(sysconfig.get_config_var('srcdir'), 'build')
         TEMPDIR = os.path.abspath(TEMPDIR)
-        if not os.path.exists(TEMPDIR):
+        try:
             os.mkdir(TEMPDIR)
+        except OSError as e:
+            if e.errno != errno.EEXIST:
+                raise
 
     # Define a writable temp dir that will be used as cwd while running
     # the tests. The name of the dir includes the pid to allow parallel
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -475,6 +475,8 @@
 Tests
 -----
 
+- Fix possible "file already exists" error when running the tests in parallel.
+
 - Issue #11719: Fix message about unexpected test_msilib skip on non-Windows
   platforms. Patch by Nadeem Vawda.
 

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


More information about the Python-checkins mailing list