pycompat: drop some now useless workaround for makedirs stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 08 Nov 2024 12:53:40 +0100
branchstable
changeset 52171 ba0a842e0907
parent 52170 f8d5001dd03e
child 52172 97d86d5b16f8
pycompat: drop some now useless workaround for makedirs This `exists_ok` flag was added in Python 3.2
tests/run-tests.py
--- a/tests/run-tests.py	Thu Nov 07 23:13:32 2024 +0100
+++ b/tests/run-tests.py	Fri Nov 08 12:53:40 2024 +0100
@@ -3919,14 +3919,8 @@
             install_env.pop('HGWITHRUSTEXT', None)
 
         # setuptools requires install directories to exist.
-        def makedirs(p):
-            try:
-                os.makedirs(p)
-            except FileExistsError:
-                pass
-
-        makedirs(self._pythondir)
-        makedirs(self._bindir)
+        os.makedirs(self._pythondir, exist_ok=True)
+        os.makedirs(self._bindir, exist_ok=True)
         if self.options.wheel is not None and not WINDOWS:
             # the wheel instalation location is not stable, so try to deal with
             # that to funnel it back where we need its.