From: Harmon Date: Tue, 5 Jan 2021 08:08:37 +0000 (-0600) Subject: Simplify requests imports in streaming.py X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0a26497059e85553bebb942f25030339e76e0db2;p=tweepy.git Simplify requests imports in streaming.py --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index bcd7331..3283e9c 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -12,7 +12,6 @@ from threading import Thread from time import sleep import requests -from requests.exceptions import Timeout from tweepy.api import API from tweepy.error import TweepError @@ -248,7 +247,7 @@ class Stream: self.snooze_time = self.snooze_time_step self.listener.on_connect() self._read_loop(resp) - except (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