summaryrefslogtreecommitdiff
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2011-10-28 16:06:23 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2011-10-28 16:06:23 +0200
commit68f71a34f4a799276a50f4001fb0a0ebe2d46992 (patch)
tree5b7a409891bb7d4a1c1750b9f97b13a7d1e392e2 /Lib/test/regrtest.py
parent908ae24b066b04651701d5ee5e5d80cfb5d6b018 (diff)
downloadcpython-git-68f71a34f4a799276a50f4001fb0a0ebe2d46992.tar.gz
Simplify and remove few dependencies on 'errno', thanks to PEP 3151.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 59bdb015ea..bbda525bea 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -166,7 +166,6 @@ option '-uall,-gui'.
"""
import builtins
-import errno
import faulthandler
import getopt
import io
@@ -1721,9 +1720,8 @@ def _make_temp_dir_for_build(TEMPDIR):
TEMPDIR = os.path.abspath(TEMPDIR)
try:
os.mkdir(TEMPDIR)
- except OSError as e:
- if e.errno != errno.EEXIST:
- raise
+ except FileExistsError:
+ pass
# 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