[gtk: 3/4] build: use condense the mkdir calls to oneliners



commit 539e3d387b91cd3600440ffd080735bb98e3a4f0
Author: Jordan Petridis <jpetridis gnome org>
Date:   Wed Feb 27 00:55:08 2019 +0200

    build: use condense the mkdir calls to oneliners

 build-aux/meson/post-install.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/build-aux/meson/post-install.py b/build-aux/meson/post-install.py
index d61873c551..d81abd28a4 100644
--- a/build-aux/meson/post-install.py
+++ b/build-aux/meson/post-install.py
@@ -23,11 +23,9 @@ if 'DESTDIR' not in os.environ:
                     os.path.join(gtk_datadir, 'icons', 'hicolor')])
 
     print('Updating module cache for print backends...')
-    if not os.path.isdir(gtk_printmodule_dir):
-        os.mkdir(gtk_printmodule_dir)
+    os.makedirs(gtk_printmodule_dir, exist_ok=True)
     subprocess.call(['gio-querymodules', gtk_printmodule_dir])
 
     print('Updating module cache for input methods...')
-    if not os.path.isdir(gtk_immodule_dir):
-        os.mkdir(gtk_immodule_dir)
+    os.makedirs(gtk_immodule_dir, exist_ok=True)
     subprocess.call(['gio-querymodules', gtk_immodule_dir])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]