Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #106 from edavis/add-timeout-to-stream

stream: Include _timeout parameter in _handle_response
In a5aab11 (and renamed in 8fd7289), \_handle_response began receiving
a \_timeout parameter when invoked via TwitterCall.__call__.

The _handle_response method in api.py was updated to reflect this, but
not the two (TwitterStreamCall, TwitterStreamCallNonBlocking) in
stream.py.

This commit adds _timeout to the two streaming classes to accommodate
the changes.
  • Loading branch information...
commit f3e81f37a833d8ce63e2e6c8ed500a1715b825fd 2 parents 65a475c + 9e19b5a
@sixohsix authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 twitter/stream.py
View
4 twitter/stream.py
@@ -53,11 +53,11 @@ def handle_stream_response(req, uri, arg_data, block):
return iter(TwitterJSONIter(handle, uri, arg_data, block))
class TwitterStreamCall(TwitterCall):
- def _handle_response(self, req, uri, arg_data):
+ def _handle_response(self, req, uri, arg_data, _timeout=None):
return handle_stream_response(req, uri, arg_data, block=True)
class TwitterStreamCallNonBlocking(TwitterCall):
- def _handle_response(self, req, uri, arg_data):
+ def _handle_response(self, req, uri, arg_data, _timeout=None):
return handle_stream_response(req, uri, arg_data, block=False)
class TwitterStream(TwitterStreamCall):
Please sign in to comment.
Something went wrong with that request. Please try again.