From eeab17e624dc4ec3c0f93ee7da957547a03d84ec Mon Sep 17 00:00:00 2001 From: grocerheist Date: Wed, 31 Dec 2014 14:00:49 -0800 Subject: [PATCH] fix formatting in last code snippet. --- docs/streaming_how_to.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/streaming_how_to.rst b/docs/streaming_how_to.rst index 63707f8..a2bd43d 100644 --- a/docs/streaming_how_to.rst +++ b/docs/streaming_how_to.rst @@ -100,11 +100,11 @@ in a window of time, they will receive error 420. The amount of time a client h will increase exponentially each time they make a failed attempt. Tweepy's **Stream Listener** usefully passes error messages to an **on_error** stub. We can use **on_error** to -catch 420 errors and disconnect our stream.:: +catch 420 errors and disconnect our stream. :: class MyStreamListener(tweepy.StreamListener): - def on_error(self, status_code): + def on_error(self, status_code): if status_code == 420: #returning False in on_data disconnects the stream return False -- 2.25.1