Ensure setup.h was found before trying to open it

This commit is contained in:
Robin Dunn
2019-08-21 16:46:26 -07:00
parent 4a6d2f467c
commit 10cd50b68d

View File

@@ -589,6 +589,10 @@ class Configuration(object):
return None
setup = _find_setup()
if setup is None:
msg("WARNING: Unable to find setup.h in {}, assuming {} is not available.".format(build_dir, flag))
return False
with open(setup, 'rt') as f:
for line in f:
if flag in line: