mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-03 06:19:59 -04:00
- this collection can be None on cleanup, so check for that
This commit is contained in:
@@ -41,7 +41,7 @@ ref(listenercollection) -> {
|
||||
|
||||
def _collection_gced(ref):
|
||||
# defaultdict, so can't get a KeyError
|
||||
if ref not in _collection_to_key:
|
||||
if not _collection_to_key or ref not in _collection_to_key:
|
||||
return
|
||||
listener_to_key = _collection_to_key.pop(ref)
|
||||
for key in listener_to_key.values():
|
||||
|
||||
Reference in New Issue
Block a user