Merge pull request #1333 from wxWidgets/fix-issue1331

Ensure setup.h was found before trying to open it

(cherry picked from commit 0cb8297700)
This commit is contained in:
Robin Dunn
2019-08-21 19:16:20 -07:00
committed by Robin Dunn
parent d7508fe463
commit f38324c6a2

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: