Skip to content

Instantly share code, notes, and snippets.

@dirk-thomas
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirk-thomas/5934af23375cd382ba84 to your computer and use it in GitHub Desktop.
Save dirk-thomas/5934af23375cd382ba84 to your computer and use it in GitHub Desktop.
Verify that all released package.xml files are parsable and valid
from catkin_pkg.package import parse_package_string
import rosdistro
i = rosdistro.get_index(rosdistro.get_index_url())
for distro in ['groovy', 'hydro', 'indigo']:
print(distro)
d = rosdistro.get_cached_distribution(i, distro)
f = d._distribution_file
for name in sorted(f.release_packages.keys()):
xml = d.get_release_package_xml(name)
if xml is None:
continue
try:
pkg = parse_package_string(xml)
except Exception as e:
print(name, str(e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment