Refs #31949 -- Simplified @sensitive_variables a bit.

Follow up to 38e391e95f.
This commit is contained in:
Jon Janzen 2023-06-23 07:15:57 -07:00 committed by Mariusz Felisiak
parent 38e391e95f
commit 6523860ca8
1 changed files with 1 additions and 4 deletions

View File

@ -39,10 +39,7 @@ def sensitive_variables(*variables):
def decorator(func): def decorator(func):
if iscoroutinefunction(func): if iscoroutinefunction(func):
sensitive_variables_wrapper = func
@wraps(func)
async def sensitive_variables_wrapper(*func_args, **func_kwargs):
return await func(*func_args, **func_kwargs)
wrapped_func = func wrapped_func = func
while getattr(wrapped_func, "__wrapped__", None) is not None: while getattr(wrapped_func, "__wrapped__", None) is not None: