log.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:widgetastic.core 作者: RedHatQE 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号