def call_unlogged(method, *args, **kwargs):
"""Calls the original method without logging when ``logged`` is applied.
In case you pass in an ordinary method that was not decorated, it will work as usual.
Args:
method: The method object from the object.
*args: Args to pass to the method.
**kwargs: Keyword arguments to pass to the method.
Returns:
Whatever that method returns.
"""
try:
f = method.original_function
except AttributeError:
f = get_method_function(method)
return f(get_method_self(method), *args, **kwargs)
评论列表
文章目录