#NEWLINE# def get_config( cfg_path = None , options = None ) : #NEWLINE# #INDENT# agentConfig = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# path = os . path . realpath ( __file__ ) #NEWLINE# path = os . path . dirname ( path ) #NEWLINE# config_path = get_config_path ( cfg_path , os_name = get_os ( ) ) #NEWLINE# config = configparser . ConfigParser ( ) #NEWLINE# config . readfp ( skip_leading_wsp ( open ( config_path ) ) ) #NEWLINE# for option in config . options ( 'Main' ) : #NEWLINE# #INDENT# agentConfig [ option ] = config . get ( 'Main' , option ) #NEWLINE# #UNINDENT# #UNINDENT# except Exception : #NEWLINE# #INDENT# raise CfgNotFound #NEWLINE# #UNINDENT# return agentConfig