PYTHON-4907 Avoid noisy TypeError at interpreter exit (#2005)
This commit is contained in:
parent
18940030f1
commit
c9d9d7c2dc
@ -1195,7 +1195,8 @@ class AsyncMongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
ResourceWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
except AttributeError:
|
||||
except (AttributeError, TypeError):
|
||||
# Ignore errors at interpreter exit.
|
||||
pass
|
||||
|
||||
def _close_cursor_soon(
|
||||
|
||||
@ -1193,7 +1193,8 @@ class MongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
ResourceWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
except AttributeError:
|
||||
except (AttributeError, TypeError):
|
||||
# Ignore errors at interpreter exit.
|
||||
pass
|
||||
|
||||
def _close_cursor_soon(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user