We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcd0889 commit 1e35ee4Copy full SHA for 1e35ee4
2 files changed
TwitterAPI/TwitterAPI.py
@@ -8,7 +8,7 @@
8
import json
9
import logging
10
import requests
11
-from requests.exceptions import ConnectionError, SSLError
+from requests.exceptions import ConnectionError, ReadTimeout, SSLError
12
from requests.packages.urllib3.exceptions import ReadTimeoutError, ProtocolError
13
from requests_oauthlib import OAuth1
14
from .TwitterError import *
@@ -230,7 +230,7 @@ def _iter_stream(self):
230
item = self.stream.read(nbytes)
231
break
232
yield item
233
- except (ConnectionError, ProtocolError, ReadTimeoutError, SSLError) as e:
+ except (ConnectionError, ProtocolError, ReadTimeout, ReadTimeoutError, SSLError) as e:
234
# client must re-connect
235
logging.info('%s %s' % (type(e), e.message))
236
raise TwitterConnectionError(e)
TwitterAPI/TwitterRestPager.py
@@ -5,7 +5,7 @@
5
6
import time
7
@@ -77,7 +77,7 @@ def get_iterator(self, wait=5, new_tweets=False):
77
self.params['since_id'] = str(id)
78
else:
79
self.params['max_id'] = str(id - 1)
80
81
82
logging.warning('%s %s' % (type(e), e.message))
83
continue
0 commit comments