From 10782f4c8412a44beed6db371120406019ae52c4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 21 Sep 2021 16:04:26 +0200 Subject: [PATCH] {android,win32}/build.py: use makedirs(exist_ok) --- android/build.py | 5 +---- win32/build.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/android/build.py b/android/build.py index 40691d8f0..dd5bb2f5b 100755 --- a/android/build.py +++ b/android/build.py @@ -140,10 +140,7 @@ class AndroidNdkToolchain: # default one on the build host import shutil bin_dir = os.path.join(install_prefix, 'bin') - try: - os.makedirs(bin_dir) - except: - pass + os.makedirs(bin_dir, exist_ok=True) self.pkg_config = shutil.copy(os.path.join(mpd_path, 'build', 'pkg-config.sh'), os.path.join(bin_dir, 'pkg-config')) self.env['PKG_CONFIG'] = self.pkg_config diff --git a/win32/build.py b/win32/build.py index 6e8705d93..86969d206 100755 --- a/win32/build.py +++ b/win32/build.py @@ -83,10 +83,7 @@ class CrossGccToolchain: # default one on the build host import shutil bin_dir = os.path.join(install_prefix, 'bin') - try: - os.makedirs(bin_dir) - except: - pass + os.makedirs(bin_dir, exist_ok=True) self.pkg_config = shutil.copy(os.path.join(mpd_path, 'build', 'pkg-config.sh'), os.path.join(bin_dir, 'pkg-config')) self.env['PKG_CONFIG'] = self.pkg_config