def post_clear_cache(func):
 @wraps(func)
 def post_clear_cache_if_not_raised(self, *args, **kwargs):
  rval = func(self, *args, **kwargs)
  self._delete_entries_cache()
  return rval
 return post_clear_cache_if_not_raised

def post_clear_cache ( func ) : @ wraps ( func ) def post_clear_cache_if_not_raised ( self , * args , ** kwargs ) : rval = func ( self , * args , ** kwargs ) self . _delete_entries_cache ( ) return rval return post_clear_cache_if_not_raised
decorator for functions that alter the index using the git command .