Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(verified_packages, rejected_packages) = roslib.stacks.expand_to_packages(rdargs)
valid_stacks = [s for s in roslib.stacks.list_stacks() if s in rdargs]
if len(rejected_packages) > 0:
print("Warning: could not identify %s as a package"%rejected_packages)
if len(verified_packages) == 0 and len(valid_stacks) == 0:
parser.error("No Valid Packages or stacks listed as arguments")
else: # rosdep as argumets
if options.rosdep_all:
parser.error("-a, --all is not a valid option for this command")
### Find all dependencies
try:
r = core.Rosdep(verified_packages, robust=options.robust)
except roslib.os_detect.OSDetectException as ex:
print("rosdep ABORTING. Failed to detect OS: %s"%ex)
return 1
except roslib.exceptions.ROSLibException as ex:
print("rosdep ABORTING: %s"%ex)
return 1
if options.verbose:
print("Detected OS: " + r.osi.get_name())
print("Detected Version: " + r.osi.get_version())
try:
if command == "generate_bash" or command == "satisfy":
missing_packages = r.satisfy()
if not missing_packages: