bin/update/path.py |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit d4370db8ceb74950d3ef381d4a0c1aca033f0294
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Wed Dec 6 16:29:12 2023 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Thu Dec 7 08:57:10 2023 +0100

    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.bergm...@allotropia.de>

diff --git a/bin/update/path.py b/bin/update/path.py
index 0420fa3784a0..d91e9e7fba55 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":

Reply via email to