Get rid of hasattr.

pull/1303/head
Jussi Pakkanen 8 years ago
parent db8ad2a4bd
commit 58878b998d
  1. 4
      mesonbuild/backend/ninjabackend.py
  2. 2
      mesonbuild/build.py

@ -2163,9 +2163,7 @@ rule FORTRAN_DEP_HACK
def get_build_on_all_targets(self):
result = []
for t in self.build.get_targets().values():
if t.build_on_all or \
(hasattr(t, 'install') and t.install) or\
(hasattr(t, 'build_always') and t.build_always):
if t.build_on_all or t.install or t.build_always:
result.append(t)
return result

@ -258,6 +258,8 @@ class Target:
self.name = name
self.subdir = subdir
self.build_on_all = build_on_all
self.install = False
self.build_always = False
def get_basename(self):
return self.name

Loading…
Cancel
Save