Skip to content

Commit

Permalink
Suppress blind except flake8 error (#120)
Browse files Browse the repository at this point in the history
Alternatively, we could throw a known, possibly custom, type from colcon_cmake
and catch it here.
For now, suppressing the linter error seems much easier.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
  • Loading branch information
jacobperron authored Mar 15, 2021
1 parent 4666a48 commit eb0b932
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion colcon_ros/task/ament_cmake/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def build(self): # noqa: D102
# if the build has failed getting targets might not be possible
try:
has_install_target = await has_target(args.build_base, 'install')
except Exception:
except Exception: # noqa: B902
if not rc:
raise
has_install_target = False
Expand Down
2 changes: 1 addition & 1 deletion colcon_ros/task/catkin/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def build(self): # noqa: D102
# if the build has failed getting targets might not be possible
try:
has_install_target = await has_target(args.build_base, 'install')
except Exception:
except Exception: # noqa: B902
if not rc:
raise
has_install_target = False
Expand Down
2 changes: 1 addition & 1 deletion colcon_ros/task/cmake/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def build(self): # noqa: D102
# if the build has failed getting targets might not be possible
try:
has_install_target = await has_target(args.build_base, 'install')
except Exception:
except Exception: # noqa: B902
if not rc:
raise
has_install_target = False
Expand Down

0 comments on commit eb0b932

Please sign in to comment.