# HG changeset patch # User Pierre-Yves David # Date 2024-11-08 11:53:40 # Node ID ba0a842e090723cd63fa9a2d72e856786aef0809 # Parent f8d5001dd03eee6b827f21c77f0ab443796f7908 pycompat: drop some now useless workaround for makedirs This `exists_ok` flag was added in Python 3.2 diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -3919,14 +3919,8 @@ class TestRunner: 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.