diff options
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/ast/introspection.py | 2 | ||||
-rw-r--r-- | mesonbuild/compilers/c.py | 2 | ||||
-rw-r--r-- | mesonbuild/dependencies/base.py | 2 | ||||
-rw-r--r-- | mesonbuild/minstall.py | 2 | ||||
-rw-r--r-- | mesonbuild/scripts/depfixer.py | 2 | ||||
-rw-r--r-- | mesonbuild/wrap/wrap.py | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index 49d531f..34e3e09 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -122,7 +122,7 @@ class IntrospectionInterpreter(AstInterpreter): subi.analyze() subi.project_data['name'] = dirname self.project_data['subprojects'] += [subi.project_data] - except: + except (mesonlib.MesonException, RuntimeError): return def func_add_languages(self, node, args, kwargs): diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 54ca894..8da0518 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -1036,7 +1036,7 @@ class CCompiler(Compiler): elf_class = 2 else: elf_class = 1 - except: + except (MesonException, KeyError): # TODO evaluate if catching KeyError is wanted here elf_class = 0 # Search in the specified dirs, and then in the system libraries for d in itertools.chain(extra_dirs, self.get_library_dirs(env, elf_class)): diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 6063fd3..313f2a0 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -1107,7 +1107,7 @@ class CMakeDependency(ExternalDependency): for l in lexer1: if l.func == 'set': self._cmake_set(l) - except: + except MesonException: return None # Extract the variables and sanity check them diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index c6b6bbf..04aba2f 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -93,7 +93,7 @@ def set_chown(path, user=None, group=None, dir_fd=None, follow_symlinks=True): dir_fd=dir_fd, follow_symlinks=follow_symlinks) shutil.chown(path, user, group) - except: + except Exception: raise finally: os.chown = real_os_chown diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py index 7294186..19fe0fe 100644 --- a/mesonbuild/scripts/depfixer.py +++ b/mesonbuild/scripts/depfixer.py @@ -123,7 +123,7 @@ class Elf(DataSizes): self.parse_header() self.parse_sections() self.parse_dynamic() - except: + except (struct.error, RuntimeError): self.bf.close() raise diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index 4d9d032..4a5d726 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -84,7 +84,7 @@ class PackageDefinition: try: self.config = configparser.ConfigParser(interpolation=None) self.config.read(fname) - except: + except configparser.Error: raise WrapException('Failed to parse {}'.format(self.basename)) if len(self.config.sections()) < 1: raise WrapException('Missing sections in {}'.format(self.basename)) |