Simplify and remove few dependencies on 'errno', thanks to PEP 3151.
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 59bdb01..bbda525 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -166,7 +166,6 @@
 """
 
 import builtins
-import errno
 import faulthandler
 import getopt
 import io
@@ -1721,9 +1720,8 @@
         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