diff --git a/colcon_cmake/event_handler/compile_commands.py b/colcon_cmake/event_handler/compile_commands.py index fde4667..e0e14a1 100644 --- a/colcon_cmake/event_handler/compile_commands.py +++ b/colcon_cmake/event_handler/compile_commands.py @@ -68,13 +68,13 @@ def __call__(self, event): # noqa: D102 try: workspace_level_mtime = os.path.getmtime( str(workspace_level_json_path)) - except Exception: + except OSError: pass else: for json_path in sorted(package_level_json_paths): try: mtime = os.path.getmtime(str(json_path)) - except Exception: + except OSError: continue if mtime > workspace_level_mtime: break