File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -310,18 +310,22 @@ def _run_operation_(op1, op2):
310310 try :
311311 func1 (* args1 , ** kwargs1 )
312312 except pymongo .errors .OperationFailure as e :
313- print "Failed func1 with " + str (e )
313+ if verbose :
314+ print "Failed func1 with " + str (e )
314315 exceptionOne = e
315316 except MongoModelException as e :
316- print "Failed func1 with " + str (e )
317+ if verbose :
318+ print "Failed func1 with " + str (e )
317319 exceptionOne = e
318320 try :
319321 func2 (* args2 , ** kwargs2 )
320322 except pymongo .errors .OperationFailure as e :
321- print "Failed func2 with " + str (e )
323+ if verbose :
324+ print "Failed func2 with " + str (e )
322325 exceptionTwo = e
323326 except MongoModelException as e :
324- print "Failed func2 with " + str (e )
327+ if verbose :
328+ print "Failed func2 with " + str (e )
325329 exceptionTwo = e
326330
327331 if ((exceptionOne is None and exceptionTwo is None )
You can’t perform that action at this time.
0 commit comments