# HG changeset patch # User Pierre-Yves David # Date 1731066820 -3600 # Node ID ba0a842e090723cd63fa9a2d72e856786aef0809 # Parent f8d5001dd03eee6b827f21c77f0ab443796f7908 pycompat: drop some now useless workaround for makedirs This `exists_ok` flag was added in Python 3.2 diff -r f8d5001dd03e -r ba0a842e0907 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.