Skip to content

Commit e91e287

Browse files
author
Jon Nappi
committed
One last commit to fix the possible KeyErrors when closing a session
1 parent cd2aeb3 commit e91e287

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dyn/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def close_session(cls):
9797
key = getattr(cls, '__metakey__')
9898
closed = cls._instances.get(key, {}).pop(cur_thread, None)
9999
if len(cls._instances.get(key, {})) == 0:
100-
cls._instances.pop(key)
100+
cls._instances.pop(key, None)
101101
return closed
102102

103103
@property

0 commit comments

Comments
 (0)