Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pymongo/asynchronous/mongo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,8 @@ def __del__(self) -> None:
ResourceWarning,
stacklevel=2,
)
except AttributeError:
except (AttributeError, TypeError):
# Ignore errors at interpreter exit.
pass

def _close_cursor_soon(
Expand Down
3 changes: 2 additions & 1 deletion pymongo/synchronous/mongo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,8 @@ def __del__(self) -> None:
ResourceWarning,
stacklevel=2,
)
except AttributeError:
except (AttributeError, TypeError):
# Ignore errors at interpreter exit.
pass

def _close_cursor_soon(
Expand Down
Loading