def require_remote_ref_path(func):
 def wrapper(self, *args):
  if (not self.is_remote()):
   raise ValueError(('ref path does not point to a remote reference: %s' % self.path))
  return func(self, *args)
 wrapper.__name__ = func.__name__
 return wrapper

def require_remote_ref_path ( func ) : def wrapper ( self , * args ) : if ( not self . is_remote ( ) ) : raise ValueError ( ( 'ref path does not point to a remote reference: %s' % self . path ) ) return func ( self , * args ) wrapper . __name__ = func . __name__ return wrapper
a decorator raising a typeerror if we are not a valid remote .