changeset 52205:ba0a842e0907 stable

pycompat: drop some now useless workaround for makedirs This `exists_ok` flag was added in Python 3.2
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 08 Nov 2024 12:53:40 +0100
parents f8d5001dd03e
children 97d86d5b16f8
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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.