File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2565,8 +2565,8 @@ async def run(self) -> T:
2565
2565
while True :
2566
2566
self ._check_last_error (check_csot = True )
2567
2567
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 } " )
2570
2570
return await self ._read () if self ._is_read else await self ._write ()
2571
2571
except ServerSelectionTimeoutError :
2572
2572
# The application may think the write was never attempted
@@ -2578,8 +2578,8 @@ async def run(self) -> T:
2578
2578
# most likely be a waste of time.
2579
2579
raise
2580
2580
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 } " )
2583
2583
# Execute specialized catch on read
2584
2584
if self ._is_read :
2585
2585
if isinstance (exc , (ConnectionFailure , OperationFailure )):
You can’t perform that action at this time.
0 commit comments