def config_read_reseller_options(conf, defaults):
 reseller_prefix_opt = conf.get('reseller_prefix', 'AUTH').split(',')
 reseller_prefixes = []
 for prefix in [pre.strip() for pre in reseller_prefix_opt if pre.strip()]:
  if (prefix == "''"):
   prefix = ''
  prefix = append_underscore(prefix)
  if (prefix not in reseller_prefixes):
   reseller_prefixes.append(prefix)
 if (len(reseller_prefixes) == 0):
  reseller_prefixes.append('')
 associated_options = {}
 for prefix in reseller_prefixes:
  associated_options[prefix] = dict(defaults)
  associated_options[prefix].update(config_read_prefixed_options(conf, '', defaults))
  prefix_name = (prefix if (prefix != '') else "''")
  associated_options[prefix].update(config_read_prefixed_options(conf, prefix_name, defaults))
 return (reseller_prefixes, associated_options)

def config_read_reseller_options ( conf , defaults ) : reseller_prefix_opt = conf . get ( 'reseller_prefix' , 'AUTH' ) . split ( ',' ) reseller_prefixes = [ ] for prefix in [ pre . strip ( ) for pre in reseller_prefix_opt if pre . strip ( ) ] : if ( prefix == "''" ) : prefix = '' prefix = append_underscore ( prefix ) if ( prefix not in reseller_prefixes ) : reseller_prefixes . append ( prefix ) if ( len ( reseller_prefixes ) == 0 ) : reseller_prefixes . append ( '' ) associated_options = { } for prefix in reseller_prefixes : associated_options [ prefix ] = dict ( defaults ) associated_options [ prefix ] . update ( config_read_prefixed_options ( conf , '' , defaults ) ) prefix_name = ( prefix if ( prefix != '' ) else "''" ) associated_options [ prefix ] . update ( config_read_prefixed_options ( conf , prefix_name , defaults ) ) return ( reseller_prefixes , associated_options )
read reseller_prefix option and associated options from configuration reads the reseller_prefix option .