1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 09:13:23 +00:00

Fix compatibility with Python 3.7

This commit is contained in:
Felix Yan
2018-07-21 17:03:19 +08:00
committed by Luiz Menezes
parent 10736db427
commit e93060c81b
3 changed files with 9 additions and 2 deletions

View File

@@ -136,7 +136,10 @@ class CassetteContextDecorator(object):
except Exception:
to_yield = coroutine.throw(*sys.exc_info())
else:
to_yield = coroutine.send(to_send)
try:
to_yield = coroutine.send(to_send)
except StopIteration:
break
def _handle_function(self, fn):
with self as cassette: