catching invalid stack lookups #2226 #2227

This commit is contained in:
Tully Foote 2009-12-28 19:00:43 +00:00
parent 623929bcd5
commit 9c3b6c73bb
1 changed files with 9 additions and 2 deletions

View File

@ -171,9 +171,16 @@ class RosdepLookupPackage:
for p in rosdep_dependent_packages: for p in rosdep_dependent_packages:
stack = roslib.stacks.stack_of(p) stack = roslib.stacks.stack_of(p)
if stack: if stack:
try:
paths.add( os.path.join(roslib.stacks.get_stack_dir(stack), "rosdep.yaml")) paths.add( os.path.join(roslib.stacks.get_stack_dir(stack), "rosdep.yaml"))
except AttributeError, ex:
print "Stack [%s] could not be found"%(stack)
for s in self.yaml_cache.get_rosstack_depends(stack): for s in self.yaml_cache.get_rosstack_depends(stack):
try:
paths.add( os.path.join(roslib.stacks.get_stack_dir(s), "rosdep.yaml")) paths.add( os.path.join(roslib.stacks.get_stack_dir(s), "rosdep.yaml"))
except AttributeError, ex:
print "Stack [%s] dependency of [%s] could not be found"%(s, stack)
else: else:
paths.add( os.path.join(roslib.packages.get_pkg_dir(p), "rosdep.yaml")) paths.add( os.path.join(roslib.packages.get_pkg_dir(p), "rosdep.yaml"))
for path in paths: for path in paths: