Commit 4b48cb9e authored by Dan Fairs's avatar Dan Fairs
Browse files

Provide a hook for subclasses to do something when a response closes.

parent c2edbea6
......@@ -157,6 +157,8 @@ class Stream(object):
# buffer
buf += c
if resp.isclosed():
def _start(self, async):
self.running = True
......@@ -165,6 +167,10 @@ class Stream(object):
def on_closed(self, resp):
""" Called when the response has been closed by Twitter """
def userstream(self, count=None, async=False, secure=True):
if self.running:
raise TweepError('Stream object already connected!')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment