def _configs_from_dir(conf_dir):
 for filename in sorted(os.listdir(conf_dir)):
  if (filename.startswith('.') or (not filename.endswith('.ini'))):
   continue
  LOG.debug(('Loading configuration from: %s' % filename))
  try:
   conf = configobj.ConfigObj(os.path.join(conf_dir, filename))
  except configobj.ConfigObjError as ex:
   LOG.error(("Error in configuration file '%s': %s" % (os.path.join(conf_dir, filename), ex)))
   raise
  conf['DEFAULT'] = dict(desktop_root=get_desktop_root(), build_dir=get_build_dir())
  (yield conf)

def _configs_from_dir ( conf_dir ) : for filename in sorted ( os . listdir ( conf_dir ) ) : if ( filename . startswith ( '.' ) or ( not filename . endswith ( '.ini' ) ) ) : continue LOG . debug ( ( 'Loading configuration from: %s' % filename ) ) try : conf = configobj . ConfigObj ( os . path . join ( conf_dir , filename ) ) except configobj . ConfigObjError as ex : LOG . error ( ( "Error in configuration file '%s': %s" % ( os . path . join ( conf_dir , filename ) , ex ) ) ) raise conf [ 'DEFAULT' ] = dict ( desktop_root = get_desktop_root ( ) , build_dir = get_build_dir ( ) ) ( yield conf )
generator to load configurations from a directory .