util.py
Go to the documentation of this file.
00001 import os
00002 import sys
00003 import traceback
00004 from package import Package
00005 
00006 
00007 def get_packages(root_fn='.', create_objects=True):
00008     packages = []
00009     for root, dirs, files in os.walk(root_fn):
00010         if '.git' in root:
00011             continue
00012         if 'package.xml' in files:
00013             if create_objects:
00014                 try:
00015                     packages.append(Package(root))
00016                 except:
00017                     sys.stderr.write('ERROR: Trouble parsing package @ %s\n' % root)
00018                     sys.stderr.write(traceback.format_exc())
00019             else:
00020                 packages.append(root)
00021     return packages


ros_introspection
Author(s):
autogenerated on Wed Jun 19 2019 19:21:34