summaryrefslogtreecommitdiffstats
path: root/Lib/contextlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/contextlib.py')
-rw-r--r--Lib/contextlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/contextlib.py b/Lib/contextlib.py
index 625bb33..d582221 100644
--- a/Lib/contextlib.py
+++ b/Lib/contextlib.py
@@ -152,7 +152,7 @@ class _GeneratorContextManager(
# tell if we get the same exception back
value = typ()
try:
- self.gen.throw(typ, value, traceback)
+ self.gen.throw(value)
except StopIteration as exc:
# Suppress StopIteration *unless* it's the same exception that
# was passed to throw(). This prevents a StopIteration
@@ -219,7 +219,7 @@ class _AsyncGeneratorContextManager(
# tell if we get the same exception back
value = typ()
try:
- await self.gen.athrow(typ, value, traceback)
+ await self.gen.athrow(value)
except StopAsyncIteration as exc:
# Suppress StopIteration *unless* it's the same exception that
# was passed to throw(). This prevents a StopIteration