From: Harmon Date: Tue, 5 Jan 2021 08:54:51 +0000 (-0600) Subject: Remove explicit handling of requests.ReadTimeout in Stream X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a588ecac8819232e8badf27aed3959b5cae5fbc2;p=tweepy.git Remove explicit handling of requests.ReadTimeout in Stream requests.ReadTimeout subclasses requests.Timeout, so this shouldn't be necessary --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 0db1a9d..3283e9c 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -247,8 +247,7 @@ class Stream: self.snooze_time = self.snooze_time_step self.listener.on_connect() self._read_loop(resp) - except (requests.ReadTimeout, requests.Timeout, - ssl.SSLError) as exc: + except (requests.Timeout, ssl.SSLError) as exc: # This is still necessary, as a SSLError can actually be # thrown when using Requests # If it's not time out treat it like any other exception