Skip to content

Commit

Permalink
Handle bad or missing package on ros2 interface show. (#366)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic authored Oct 18, 2019
1 parent 4cfb8b9 commit 8ece0f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ros2interface/ros2interface/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def get_interfaces(package_name):

def get_interface_path(parts):
prefix_path = has_resource('packages', parts[0])
if not prefix_path:
raise LookupError('Unknown package {}'.format(parts[0]))
joined = '/'.join(parts)
if len(parts[-1].rsplit('.', 1)) == 1:
joined += '.idl'
Expand Down

0 comments on commit 8ece0f1

Please sign in to comment.