mkdir_p still needed by make create-partial-info

157298bb80 "android and bin/update: make pythonic"
had removed it, so that `make create-partial-info` would now fail at least with

> Traceback (most recent call last):
>   File "bin/update/create_partial_update.py", line 10, in <module>
>     from path import UpdaterPath, mkdir_p, convert_to_unix, convert_to_native
> ImportError: cannot import name 'mkdir_p' from 'path' (bin/update/path.py)

(and no idea if that make target would still do anything useful, beyond this
initial hurdle)

Change-Id: Ib1be3304e2b3468dc187c1b5e24041e68a3677fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160397
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
This commit is contained in:
Stephan Bergmann 2023-12-06 16:29:12 +01:00
parent 4022666087
commit d4370db8ce

View file

@ -8,9 +8,18 @@
#
import os
import errno
import subprocess
from sys import platform
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc: # Python >2.5
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
else:
raise
def convert_to_unix(path):
if platform == "cygwin":