#NEWLINE# def __init__( self , node = None ) : #NEWLINE# #INDENT# self . _node = node #NEWLINE# path = [ os . path . dirname ( inspect . getfile ( Sys ) ) ] #NEWLINE# name = __name__ #NEWLINE# self . _name = name #NEWLINE# self . _path = path #NEWLINE# self . modules = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# packages = pkgutil . walk_packages ( path , ( name + '.' ) ) #NEWLINE# blacklist = ( _conf . get ( None , 'capabilities_blacklist' ) or [ ] ) #NEWLINE# _log . analyze ( ( node . id if node else None ) , '+ BLACKLIST' , { #NEWLINE# #INDENT# 'blacklist' : blacklist , #NEWLINE# #UNINDENT# } ) #NEWLINE# for package in packages : #NEWLINE# #INDENT# if ( not package [ 2 ] ) : #NEWLINE# #INDENT# ( _ , _ , package_name ) = package [ 1 ] . partition ( '.' ) #NEWLINE# if ( package_name not in blacklist ) : #NEWLINE# #INDENT# self . modules [ package_name ] = { #NEWLINE# #INDENT# 'name' : package [ 1 ] , #NEWLINE# 'module' : None , #NEWLINE# 'error' : None , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# pass