- for type in modules:
- if type == MODULE_CLASS_SCSI:
- print( "all scsi modules:" )
- for a_mod in modules[type]:
- print a_mod
- elif type == MODULE_CLASS_NETWORK:
- print( "all network modules:" )
- for a_mod in modules[type]:
- print a_mod
+ for module_class in (MODULE_CLASS_SCSI,MODULE_CLASS_NETWORK):
+ if len(modules[module_class]) > 0:
+ module_list = ""
+ for a_mod in modules[module_class]:
+ module_list = module_list + "%s " % a_mod
+ print "all %s modules: %s" % (module_class, module_list)