Import datetime into _prune function

This commit is contained in:
Israel Brewster 2017-06-08 15:12:06 -08:00
parent 1d685c4792
commit 69340181eb

View File

@ -352,6 +352,7 @@ class CachingConnectionPool(AbstractConnectionPool):
def _prune(self):
"""Remove any expired connections from the connection pool."""
from datetime import datetime, timedelta
junk_expirations = []
for obj_id, exp_time in self._expirations.items():
# _expirations is an ordered dict, so results should be in chronological order