"""
self.collect_modules()
+ self.print_modules()
+
+ # -------------------------------------------------------------------------
+ def print_modules(self):
+
+ title_base = 'Modul'
+ title_name = 'Name komplett'
+ title_vendor = 'Vendor'
+ title_version = 'Version'
+
+ len_base = len(title_base)
+ len_name = len(title_name)
+ len_vendor = len(title_vendor)
+ len_version = len(title_version)
+
+ for b_name in self.modules.keys():
+ module_info = self.modules[b_name]
+ base_name = str(b_name)
+ if len(base_name) > len_base:
+ len_base = len(base_name)
+ if module_info['name']:
+ if len(module_info['name']) > len_name:
+ len_name = len(module_info['name'])
+ if module_info['vendor']:
+ if len(module_info['vendor']) > len_vendor:
+ len_vendor = len(module_info['vendor'])
+ if module_info['version']:
+ if len(module_info['version']) > len_version:
+ len_version = len(module_info['version'])
+
+ template = (
+ '{{base:<{lb}}} {{name:<{ln}}} {{vendor:<{lven}}} {{version:<{lver}}}'.format(
+ lb=len_base, ln=len_name, lven=len_vendor, lver=len_version))
+ len_total = len_base + len_name + len_vendor + len_version + 10
+ if self.verbose > 1:
+ LOG.debug("Module line template: {!r}".format(template))
+ print()
+ print(template.format(
+ base=title_base, name=title_name, vendor=title_vendor, version=title_version))
+ print('=' * len_total)
+
+ for b_name in sorted(self.modules.keys(), key=str.lower):
+
+ module_info = self.modules[b_name]
+ base_name = str(b_name)
+
+ mod_name = '~'
+ if module_info['name']:
+ mod_name = module_info['name']
+
+ vendor_name = '~'
+ if module_info['vendor']:
+ vendor_name = module_info['vendor']
+
+ version = '~'
+ if module_info['version']:
+ version = module_info['version']
+
+ print(template.format(
+ base=base_name, name=mod_name, vendor=vendor_name, version=version))
+
+ print()
# -------------------------------------------------------------------------
def collect_modules(self):
module_info['name'] = None
module_info['vendor'] = None
+ module_info['version'] = None
module_info['dependencies'] = {}
if 'name'in meta_info:
module_info['name'] = meta_info['name']
if match:
module_info['vendor'] = match.group(1)
+ if 'version' in meta_info:
+ module_info['version'] = meta_info['version']
+
if 'dependencies' in meta_info:
for dep in meta_info['dependencies']:
if 'name' in dep: