Less redundant freeing of resources on redirects

With 495646bb6a the double flush is no longer
needed.
This commit is contained in:
Chris Adams
2012-01-29 18:45:14 -05:00
parent b98cc8b4e9
commit 67f50a0fe5
+2
View File
@@ -210,6 +210,8 @@ class Request(object):
while (('location' in r.headers) and
((r.status_code is codes.see_other) or (self.allow_redirects))):
r.content # Consume socket so it can be released
if not len(history) < self.config.get('max_redirects'):
raise TooManyRedirects()