diff options
author | Aleksey Filippov <alekseyf@google.com> | 2018-03-09 01:20:26 +0000 |
---|---|---|
committer | Aleksey Filippov <alekseyf@google.com> | 2018-03-11 23:36:04 +0000 |
commit | e4faf396e62813665e44fc742e7f355ad532f4d2 (patch) | |
tree | 8976409cd8eb35d862270d0cc90217b96109af6e /mesonbuild/compilers | |
parent | d977b78f1b6f95a6eab3da8a6d7d9ad06d8b80fd (diff) | |
download | meson-e4faf396e62813665e44fc742e7f355ad532f4d2.zip meson-e4faf396e62813665e44fc742e7f355ad532f4d2.tar.gz meson-e4faf396e62813665e44fc742e7f355ad532f4d2.tar.bz2 |
Do not use bare except [flake8]
Use more specific exception types where appropriate.
This patch does not change bare except calls if exception is re-raised.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/c.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 1c9b9b4..2d14116 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -525,7 +525,7 @@ class CCompiler(Compiler): elif rtype == 'int': try: return int(res.stdout.strip()) - except: + except ValueError: m = 'Return value of {}() is not an int' raise EnvironmentException(m.format(fname)) @@ -1140,7 +1140,7 @@ class VisualStudioCCompiler(CCompiler): # See boost/config/compiler/visualc.cpp for up to date mapping try: version = int(''.join(self.version.split('.')[0:2])) - except: + except ValueError: return None if version < 1310: return '7.0' |