Skip to content

Commit

Permalink
Syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
RouxRC committed Dec 27, 2013
1 parent 3df3413 commit 642c4a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions twitter/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ def __iter__(self):
else:
raise

def handle_stream_response(req, uri, arg_data, block, timeout=None):
def handle_stream_response(req, uri, arg_data, block=True, timeout=None):
handle = urllib_request.urlopen(req,)
return iter(TwitterJSONIter(handle, uri, arg_data, block, timeout=timeout,
display_sizes=("delimited=length" in req.get_data().lower())))

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)
return handle_stream_response(req, uri, arg_data, timeout=self.timeout)

class TwitterStreamCall(TwitterCall):
def _handle_response(self, req, uri, arg_data, _timeout=None):
return handle_stream_response(req, uri, arg_data, block=True)
return handle_stream_response(req, uri, arg_data)

class TwitterStreamCallNonBlocking(TwitterCall):
def _handle_response(self, req, uri, arg_data, _timeout=None):
Expand Down

0 comments on commit 642c4a4

Please sign in to comment.