mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +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:
|
||||
connection = pool.pool.get()
|
||||
if isinstance(connection, self._connection_class):
|
||||
connections.remove(connection)
|
||||
try:
|
||||
connections.remove(connection)
|
||||
except KeyError:
|
||||
pass
|
||||
connection.close()
|
||||
else:
|
||||
readd_connections.append(connection)
|
||||
|
||||
Reference in New Issue
Block a user