Skip to content

Commit 1b18050

Browse files
committed
Limit coroutine hack to AST interpreter
1 parent 18a35d1 commit 1b18050

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

graalpython/lib-graalpython/type.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@
4343
# TODO: REMOVEME, temporary patch for coroutines
4444
async def _c(): pass
4545
_c = _c()
46-
def _coro_close(*args):
47-
pass
4846
ctype = type(_c)
49-
ctype.close = _coro_close
47+
if not hasattr(ctype, "close"):
48+
def _coro_close():
49+
pass
50+
ctype.close = _coro_close
5051
# TODO -----------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)