MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / timeout

Method timeout

pymongo/errors.py:299–309  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

297
298 @property
299 def timeout(self) -> bool:
300 # Check the last writeConcernError and last writeError to determine if this
301 # BulkWriteError was caused by a timeout.
302 wces = self.details.get("writeConcernErrors", [])
303 if wces and _wtimeout_error(wces[-1]):
304 return True
305
306 werrs = self.details.get("writeErrors", [])
307 if werrs and werrs[-1].get("code") == 50:
308 return True
309 return False
310
311
312class ClientBulkWriteException(OperationFailure):

Callers

nothing calls this directly

Calls 2

_wtimeout_errorFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected