diff options
-rw-r--r-- | mesonbuild/dependencies.py | 6 | ||||
-rw-r--r-- | mesonbuild/environment.py | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index 38945b4..4e87e4e 100644 --- a/mesonbuild/dependencies.py +++ b/mesonbuild/dependencies.py @@ -233,7 +233,7 @@ class PkgConfigDependency(Dependency): '(%s)' % out.decode().strip()) PkgConfigDependency.pkgconfig_found = True return - except Exception: + except (FileNotFoundError, PermissionError): pass PkgConfigDependency.pkgconfig_found = False if not self.silent: @@ -358,7 +358,7 @@ class WxDependency(Dependency): self.wxc = wxc WxDependency.wx_found = True return - except Exception: + except (FileNotFoundError, PermissionError): pass WxDependency.wxconfig_found = False mlog.log('Found wx-config:', mlog.red('NO')) @@ -1040,7 +1040,7 @@ class GnuStepDependency(Dependency): gp = subprocess.Popen([confprog, '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) gp.communicate() - except FileNotFoundError: + except (FileNotFoundError, PermissionError): self.args = None mlog.log('Dependency GnuStep found:', mlog.red('NO'), '(no gnustep-config)') return diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index cc62010..098f8ca 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -43,7 +43,8 @@ def detect_ninja(): for n in ['ninja', 'ninja-build']: try: p = subprocess.Popen([n, '--version'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) - except FileNotFoundError: + except (FileNotFoundError, PermissionError): + # Doesn't exist in PATH or isn't executable continue version = p.communicate()[0].decode(errors='ignore') # Perhaps we should add a way for the caller to know the failure mode |