fixed usage of catkin_find
This commit is contained in:
parent
3e3001b3a7
commit
22dbf4e9e7
|
@ -492,10 +492,11 @@ def find_resource(pkg, resource_name, filter_fn=None, rospack=None):
|
|||
# if found in binary dir, start with that. in any case, use matches
|
||||
# from ros_package_path
|
||||
matches = []
|
||||
for search_in in ['libexec', 'share']:
|
||||
for search_dirs in ['libexec', 'share']:
|
||||
try:
|
||||
search_path = catkin_find(search_in=[search_in], project=pkg)
|
||||
matches.extend(_find_resource(search_path, resource_name, filter_fn=filter_fn))
|
||||
search_paths, _ = catkin_find(search_dirs=[search_dirs], project=pkg)
|
||||
for search_path in search_paths:
|
||||
matches.extend(_find_resource(search_path, resource_name, filter_fn=filter_fn))
|
||||
except RuntimeError:
|
||||
pass
|
||||
matches.extend(_find_resource(pkg_path, resource_name, filter_fn=filter_fn))
|
||||
|
|
Loading…
Reference in New Issue