def wrap_conf_type(f):
 def wrapper(conf_path, *args, **kwargs):
  if os.path.isdir(conf_path):
   conf_type = 'config_dir'
  else:
   conf_type = 'config'
  conf_uri = ('%s:%s' % (conf_type, conf_path))
  return f(conf_uri, *args, **kwargs)
 return wrapper

def wrap_conf_type ( f ) : def wrapper ( conf_path , * args , ** kwargs ) : if os . path . isdir ( conf_path ) : conf_type = 'config_dir' else : conf_type = 'config' conf_uri = ( '%s:%s' % ( conf_type , conf_path ) ) return f ( conf_uri , * args , ** kwargs ) return wrapper
wrap a function whos first argument is a paste .