Skip to content

Commit ad71cc9

Browse files
fix __enter__ case
1 parent dc3ae1c commit ad71cc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

asyncstdlib/contextlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def push(self, exit: SE) -> SE:
332332
if hasattr(exit, "__aexit__"):
333333
aexit = exit.__aexit__ # type: ignore
334334
elif hasattr(exit, "__exit__"):
335-
aexit = exit.__aexit__ # type: ignore
335+
aexit = awaitify(exit.__exit__) # type: ignore
336336
elif callable(exit):
337337
aexit = awaitify(exit) # type: ignore
338338
else:

0 commit comments

Comments
 (0)