def local_extra_dirs(func):
 def wraps(self, *args, **kwargs):
  if (kwargs.get('base_dir', None) is None):
   return func(self, *args, **kwargs)
  else:
   for c in self.__class__.__mro__:
    if (c.__name__ == 'DiskObjectStore'):
     return getattr(c, func.__name__)(self, *args, **kwargs)
   raise Exception(("Could not call DiskObjectStore's %s method, does your Object Store plugin inherit from DiskObjectStore?" % func.__name__))
 return wraps

def local_extra_dirs ( func ) : def wraps ( self , * args , ** kwargs ) : if ( kwargs . get ( 'base_dir' , None ) is None ) : return func ( self , * args , ** kwargs ) else : for c in self . __class__ . __mro__ : if ( c . __name__ == 'DiskObjectStore' ) : return getattr ( c , func . __name__ ) ( self , * args , ** kwargs ) raise Exception ( ( "Could not call DiskObjectStore's %s method, does your Object Store plugin inherit from DiskObjectStore?" % func . __name__ ) ) return wraps
non-local plugin decorator using local directories for the extra_dirs .