Skip to content

Commit

Permalink
stream: Include _timeout parameter in _handle_response
Browse files Browse the repository at this point in the history
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
Eric Davis committed Dec 6, 2012
1 parent 65a475c commit 9e19b5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions twitter/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 9e19b5a

Please sign in to comment.