def _domain_config_finder(conf_dir):
 LOG.info(_LI('Scanning %r for domain config files'), conf_dir)
 for (r, d, f) in os.walk(conf_dir):
  for fname in f:
   if (fname.startswith(DOMAIN_CONF_FHEAD) and fname.endswith(DOMAIN_CONF_FTAIL)):
    if (fname.count('.') >= 2):
     domain_name = fname[len(DOMAIN_CONF_FHEAD):(- len(DOMAIN_CONF_FTAIL))]
     (yield (os.path.join(r, fname), domain_name))
     continue
   LOG.warning(_LW('Ignoring file (%s) while scanning domain config directory'), fname)

def _domain_config_finder ( conf_dir ) : LOG . info ( _LI ( 'Scanning %r for domain config files' ) , conf_dir ) for ( r , d , f ) in os . walk ( conf_dir ) : for fname in f : if ( fname . startswith ( DOMAIN_CONF_FHEAD ) and fname . endswith ( DOMAIN_CONF_FTAIL ) ) : if ( fname . count ( '.' ) >= 2 ) : domain_name = fname [ len ( DOMAIN_CONF_FHEAD ) : ( - len ( DOMAIN_CONF_FTAIL ) ) ] ( yield ( os . path . join ( r , fname ) , domain_name ) ) continue LOG . warning ( _LW ( 'Ignoring file (%s) while scanning domain config directory' ) , fname )
return a generator of all domain config files found in a directory .