def pipeline_property(name, **kwargs):
 cache_attr_name = ('_%s' % name)
 def getter(self):
  cached_value = getattr(self, cache_attr_name, None)
  if cached_value:
   return cached_value
  app = self
  while True:
   app = getattr(app, 'app', None)
   if (not app):
    break
   try:
    value = getattr(app, name)
   except AttributeError:
    continue
   setattr(self, cache_attr_name, value)
   return value
  if ('default' in kwargs):
   return kwargs['default']
  raise AttributeError(('No apps in pipeline have a %s attribute' % name))
 return property(getter)

def pipeline_property ( name , ** kwargs ) : cache_attr_name = ( '_%s' % name ) def getter ( self ) : cached_value = getattr ( self , cache_attr_name , None ) if cached_value : return cached_value app = self while True : app = getattr ( app , 'app' , None ) if ( not app ) : break try : value = getattr ( app , name ) except AttributeError : continue setattr ( self , cache_attr_name , value ) return value if ( 'default' in kwargs ) : return kwargs [ 'default' ] raise AttributeError ( ( 'No apps in pipeline have a %s attribute' % name ) ) return property ( getter )
create a property accessor for the given name .