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