- raise TwitterHTTPError(e, uri, self.format, arg_data)
+ raise TwitterHTTPError(e, self.uri, 'json', self.arg_data)
+
+def handle_stream_response(req, uri, arg_data, block, timeout=None):
+ handle = urllib_request.urlopen(req,)
+ return iter(TwitterJSONIter(handle, uri, arg_data, block, timeout=timeout))
+
+class TwitterStreamCallWithTimeout(TwitterCall):
+ def _handle_response(self, req, uri, arg_data, _timeout=None):
+ return handle_stream_response(req, uri, arg_data, block=True, timeout=self.timeout)