Author yolanda.robla
Recipients rbcollins, yolanda.robla
Date 2016-04-20.12:40:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461156044.78.0.880052687968.issue26807@psf.upfronthosting.co.za>
In-reply-to
Content
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 7400fb7..9e47cd2 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -991,7 +991,10 @@ class CallableMixin(Base):
                 raise effect
 
             if not _callable(effect):
-                result = next(effect)
+                try:
+                    result = next(effect)
+                except StopIteration:
+                    result = None
                 if _is_exception(result):
                     raise result
                 if result is DEFAULT:
History
Date User Action Args
2016-04-20 12:40:44yolanda.roblasetrecipients: + yolanda.robla, rbcollins
2016-04-20 12:40:44yolanda.roblasetmessageid: <1461156044.78.0.880052687968.issue26807@psf.upfronthosting.co.za>
2016-04-20 12:40:44yolanda.roblalinkissue26807 messages
2016-04-20 12:40:44yolanda.roblacreate