diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2011-04-16 16:55:16 (GMT) |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-04-16 16:55:16 (GMT) |
| commit | a4eb194ea6b2ec2b0bb4ce1ea1d65ade787bc728 (patch) | |
| tree | 7bcd11dc1669f31c141a4d86cae21c5d636014d7 /Lib/test | |
| parent | bfd5a32ecdb130b62396120b4841b911667b887e (diff) | |
| parent | ee4293400cff1d5f9a7a6dd8e9aaa6ba6623e348 (diff) | |
| download | cpython-a4eb194ea6b2ec2b0bb4ce1ea1d65ade787bc728.zip cpython-a4eb194ea6b2ec2b0bb4ce1ea1d65ade787bc728.tar.gz cpython-a4eb194ea6b2ec2b0bb4ce1ea1d65ade787bc728.tar.bz2 | |
Merge from 3.2
Diffstat (limited to 'Lib/test')
| -rwxr-xr-x | Lib/test/regrtest.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index dca0b4e..9a83fbe 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -170,6 +170,7 @@ import re import io import sys import time +import errno import traceback import warnings import unittest @@ -1569,8 +1570,11 @@ def _make_temp_dir_for_build(TEMPDIR): 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 |
