def process_mistral_config(config_path):
 assert config_path.startswith('/tmp')
 if (not os.path.isfile(config_path)):
  return
 config = ConfigParser()
 config.read(config_path)
 for (section, options) in MISTRAL_CONF_OPTIONS_TO_REMOVE.items():
  for option in options:
   if config.has_option(section, option):
    config.set(section, option, REMOVED_VALUE_NAME)
 with open(config_path, 'w') as fp:
  config.write(fp)

def process_mistral_config ( config_path ) : assert config_path . startswith ( '/tmp' ) if ( not os . path . isfile ( config_path ) ) : return config = ConfigParser ( ) config . read ( config_path ) for ( section , options ) in MISTRAL_CONF_OPTIONS_TO_REMOVE . items ( ) : for option in options : if config . has_option ( section , option ) : config . set ( section , option , REMOVED_VALUE_NAME ) with open ( config_path , 'w' ) as fp : config . write ( fp )
remove sensitive data from the mistral config .