From 8f1b92a190b2ad4289ecf837c3200d540c13fdd9 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Sun, 14 Mar 2021 23:38:46 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A9=E2=80=8D=F0=9F=8C=BE=20Fix=20flake?= =?UTF-8?q?8:=20specify=20exception=20(#102)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louise Poubel --- colcon_cmake/event_handler/compile_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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