Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
6749f835
Commit
6749f835
authored
Feb 25, 2014
by
Aaron Hill
Browse files
Reset session after making request
parent
a1c9d4f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
tweepy/binder.py
View file @
6749f835
...
...
@@ -186,6 +186,7 @@ def bind_api(**config):
time
.
sleep
(
retry_delay
)
retries_performed
+=
1
self
.
session
=
requests
.
Session
()
# If an error was returned, throw an exception
self
.
api
.
last_response
=
resp
if
resp
.
status_code
and
not
200
<=
resp
.
status_code
<
300
:
...
...
tweepy/streaming.py
View file @
6749f835
...
...
@@ -189,6 +189,8 @@ class Stream(object):
if
resp
:
resp
.
close
()
self
.
session
=
requests
.
Session
()
if
exception
:
# call a handler first so that the exception can be logged.
self
.
listener
.
on_exception
(
exception
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment