From: Chase Sterling Date: Sun, 7 Dec 2014 18:49:23 +0000 (-0500) Subject: Fix crash with requests 2.5 where connectionpool was None X-Git-Tag: v1.1.3~2^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=821e148752c21630b1725f3318e1a53721a65865;p=vcrpy.git Fix crash with requests 2.5 where connectionpool was None --- diff --git a/vcr/patch.py b/vcr/patch.py index aeabf1d..6cce450 100644 --- a/vcr/patch.py +++ b/vcr/patch.py @@ -236,7 +236,7 @@ class ConnectionRemover(object): def __exit__(self, *args): for pool, connections in self._connection_pool_to_connections.items(): readd_connections = [] - while not pool.pool.empty() and connections: + while pool.pool and not pool.pool.empty() and connections: connection = pool.pool.get() if isinstance(connection, self._connection_class): connections.remove(connection)