From: Josh Roesslein Date: Sat, 8 Aug 2009 07:08:26 +0000 (-0500) Subject: Catch fatal errors and kill stream loop. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=92fd341d1205aed87dfea2bfbdd3c4f738dbb3f1;p=tweepy.git Catch fatal errors and kill stream loop. --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index fd2b111..2b9491f 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -47,6 +47,10 @@ class Stream(object): except timeout: conn.close() continue + except Exception: + # any other exception is fatal, so kill loop + self.running = False + break # cleanup conn.close()