waf: avoid problem with custom build server

this happens on custom build server when building into a new directory
This commit is contained in:
Andrew Tridgell 2021-08-10 20:05:47 +10:00
parent 4f4a0a02f6
commit fadadfb50e
1 changed files with 5 additions and 2 deletions

View File

@ -76,8 +76,11 @@ def _depends_on_vehicle(bld, source_node):
if path not in _depends_on_vehicle_cache:
s = _remove_comments(source_node.read())
_depends_on_vehicle_cache[path] = _macros_re.search(s) is not None
try:
s = _remove_comments(source_node.read())
_depends_on_vehicle_cache[path] = _macros_re.search(s) is not None
except Exception:
return False
return _depends_on_vehicle_cache[path]