From fadadfb50e831eadef1a709a149d1ad7b683dbde Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Aug 2021 20:05:47 +1000 Subject: [PATCH] waf: avoid problem with custom build server this happens on custom build server when building into a new directory --- Tools/ardupilotwaf/ap_library.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tools/ardupilotwaf/ap_library.py b/Tools/ardupilotwaf/ap_library.py index a679449945..91c34a79c5 100644 --- a/Tools/ardupilotwaf/ap_library.py +++ b/Tools/ardupilotwaf/ap_library.py @@ -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]