Skip to content

Fix flake8 blind except error by using more concrete types

Christophe Bédard requested to merge fix-flake8-blind-exception-error into master

Fixes new flake8 error: https://gitlab.com/ros-tracing/ros2_tracing/-/jobs/955751685#L3576

./tracetools_trace/tools/lttng.py:115:1: B902 blind except Exception: statement

except Exception as e:

^

https://pypi.org/project/flake8-blind-except/

I think this is showing up now because flake8-blind-except was just updated (in ci_base).

The actual error type we get when lttng isn't found is FileNotFoundError, but the code may also raise RuntimeError as a generic failure.

Edited by Christophe Bédard

Merge request reports