From 467054064d28667036864ca83b9944e27437a67e Mon Sep 17 00:00:00 2001 From: Teingi Date: Wed, 22 May 2024 09:53:54 +0800 Subject: [PATCH] ensure safe stdio usage within __init__ --- stdio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdio.py b/stdio.py index d0d8c7c6..ea56165a 100644 --- a/stdio.py +++ b/stdio.py @@ -896,7 +896,7 @@ class SafeStdioMeta(type): def _init_wrapper_func(func): def wrapper(*args, **kwargs): setattr(args[0], "_wrapper_func", {}) - func(*args, **kwargs) + safe_stdio_decorator(FAKE_IO)(func)(*args, **kwargs) if "stdio" in args[0].__dict__: args[0].__dict__["stdio"] = get_stdio(args[0].__dict__["stdio"])