File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
ros2doctor/ros2doctor/api Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,15 @@ def get_local_package_versions() -> dict:
8383 if package_name_prefixes :
8484 for name , prefix in package_name_prefixes .items ():
8585 file_path = os .path .join (prefix , 'share' , name )
86- package_obj = parse_package (file_path )
87- local_packages [name ] = package_obj .version if package_obj .version else ''
86+ try :
87+ package_obj = parse_package (file_path )
88+ local_packages [name ] = package_obj .version if package_obj .version else ''
89+ except IOError as e :
90+ print (f'Warning: Could not read package at { file_path } : { e } ' )
91+ local_packages [name ] = ''
92+ except Exception as e :
93+ print (f'Error parsing { file_path } : { e } ' )
94+ local_packages [name ] = ''
8895 return local_packages
8996
9097
You can’t perform that action at this time.
0 commit comments