mkdir_p still needed by make create-partial-info
157298bb808a943616991927f9370a86c1f2ca48 "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>
diff --git a/bin/update/path.py b/bin/update/path.py
index 0420fa3..d91e9e7 100644
--- a/bin/update/path.py
+++ b/bin/update/path.py
@@ -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":