Skip to content

Commit c3a5619

Browse files
committed
testing
1 parent ad5c717 commit c3a5619

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pymongo/asynchronous/mongo_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,8 +2565,8 @@ async def run(self) -> T:
25652565
while True:
25662566
self._check_last_error(check_csot=True)
25672567
try:
2568-
if self._operation == _Op.LIST_COLLECTIONS:
2569-
print("Retryable read for list_collections")
2568+
if self._operation in (_Op.LIST_COLLECTIONS, _Op.INSERT):
2569+
print(f"Retryable read for {self._operation}")
25702570
return await self._read() if self._is_read else await self._write()
25712571
except ServerSelectionTimeoutError:
25722572
# The application may think the write was never attempted
@@ -2578,8 +2578,8 @@ async def run(self) -> T:
25782578
# most likely be a waste of time.
25792579
raise
25802580
except PyMongoError as exc:
2581-
if self._operation == _Op.LIST_COLLECTIONS:
2582-
print(f"Error for list_collections: {exc}")
2581+
if self._operation in (_Op.LIST_COLLECTIONS, _Op.INSERT):
2582+
print(f"Error for {self._operation}: {exc}")
25832583
# Execute specialized catch on read
25842584
if self._is_read:
25852585
if isinstance(exc, (ConnectionFailure, OperationFailure)):

0 commit comments

Comments
 (0)