Skip to content

Commit

Permalink
Check if rosdep view is empty before using it
Browse files Browse the repository at this point in the history
See #109 for the corresponding discussion
  • Loading branch information
roehling committed Jan 2, 2023
1 parent f1412cd commit 9acaa0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/catkin_lint/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ def __init__(self, os_env=None, use_rosdep=True, use_rosdistro=True, use_cache=T
try:
gc.disable()
self.rosdep = get_rosdep(quiet=self.quiet)
if len(self.rosdep.view.keys()) == 0:
raise Exception("empty view, please call 'rosdep update' first")
except Exception as err:
if not self.quiet:
sys.stderr.write("catkin_lint: cannot load rosdep database: %s\n" % str(err))
Expand Down

0 comments on commit 9acaa0e

Please sign in to comment.