mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
fix a KeyError
This commit is contained in:
@@ -386,7 +386,10 @@ class ConnectionRemover:
|
|||||||
while pool.pool and not pool.pool.empty() and connections:
|
while pool.pool and not pool.pool.empty() and connections:
|
||||||
connection = pool.pool.get()
|
connection = pool.pool.get()
|
||||||
if isinstance(connection, self._connection_class):
|
if isinstance(connection, self._connection_class):
|
||||||
connections.remove(connection)
|
try:
|
||||||
|
connections.remove(connection)
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
connection.close()
|
connection.close()
|
||||||
else:
|
else:
|
||||||
readd_connections.append(connection)
|
readd_connections.append(connection)
|
||||||
|
|||||||
Reference in New Issue
Block a user