##// END OF EJS Templates
wireproto: properly implement batchable checking...
Gregory Szorc -
r33759:297d1b70 default
parent child Browse files
Show More
@@ -120,9 +120,13 b' class remoteiterbatcher(peer.iterbatcher'
120 self._remote = remote
120 self._remote = remote
121
121
122 def __getattr__(self, name):
122 def __getattr__(self, name):
123 if not getattr(self._remote, name, False):
123 # Validate this method is batchable, since submit() only supports
124 raise AttributeError(
124 # batchable methods.
125 'Attempted to iterbatch non-batchable call to %r' % name)
125 fn = getattr(self._remote, name)
126 if not getattr(fn, 'batchable', None):
127 raise error.ProgrammingError('Attempted to batch a non-batchable '
128 'call to %r' % name)
129
126 return super(remoteiterbatcher, self).__getattr__(name)
130 return super(remoteiterbatcher, self).__getattr__(name)
127
131
128 def submit(self):
132 def submit(self):
General Comments 0
You need to be logged in to leave comments. Login now