aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2024-06-09 01:03:49 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2024-06-14 17:19:53 +0300
commit9a6fcd4d9a0c7bb248c5d0587632b741a3301e03 (patch)
treef066ab0ee942d2f12579bb075cb3afbdf3386f0b /mesonbuild/backend/backends.py
parentc0d86024f5e647858f88bc400b45b3ad88a25c97 (diff)
downloadmeson-9a6fcd4d9a0c7bb248c5d0587632b741a3301e03.zip
meson-9a6fcd4d9a0c7bb248c5d0587632b741a3301e03.tar.gz
meson-9a6fcd4d9a0c7bb248c5d0587632b741a3301e03.tar.bz2
Replace direct indexing with named methods.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 740f349..c1a72f1 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -962,7 +962,7 @@ class Backend:
def target_uses_pch(self, target: build.BuildTarget) -> bool:
try:
return T.cast('bool', target.get_option(OptionKey('b_pch')))
- except KeyError:
+ except (KeyError, AttributeError):
return False
@staticmethod