File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -96,3 +96,6 @@ def check_ros1(self):
9696
9797 def get_python_version (self ):
9898 return self ._python_version
99+
100+ def get_package_names (self ):
101+ return self ._distro .release_packages .keys ()
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ def main():
2121 "--package" ,
2222 type = str ,
2323 dest = "package" ,
24- default = "ros_base" ,
25- help = "ROS package to get dependencies for (default: ros_base )" ,
24+ default = None ,
25+ help = "ROS package to get dependencies for (default: ALL )" ,
2626 required = False ,
2727 )
2828 parser .add_argument (
@@ -45,8 +45,12 @@ def main():
4545 args = parser .parse_args ()
4646
4747 distro = Distro (args .distro )
48- deps = distro .get_depends (args .package )
49- deps .add (args .package )
48+
49+ if args .package is None :
50+ deps = distro .get_package_names ()
51+ else :
52+ deps = distro .get_depends (args .package )
53+ deps .add (args .package )
5054
5155 if not args .quiet :
5256 max_len = max ([len (dep ) for dep in deps ])
@@ -55,8 +59,13 @@ def main():
5559 output = {}
5660
5761 for dep in deps :
58- url , tag = distro .get_released_repo (dep )
59- version = distro .get_version (dep )
62+ try :
63+ url , tag = distro .get_released_repo (dep )
64+ version = distro .get_version (dep )
65+ except AttributeError :
66+ print ("\033 [93mPackage '{}' has no version set, skipping...\033 [0m" .format (dep ))
67+ continue
68+
6069 output [dep ] = {"url" : url , "version" : version , "tag" : tag }
6170
6271 if not args .quiet :
You can’t perform that action at this time.
0 commit comments