관리-도구
편집 파일: decorators.cpython-39.pyc
a ���g� � @ s� d Z g d�ZddlZddlZddlZddlZddlZddlmZ ddl m Z ddlmZ ddl mZ ddlmZmZ dd lmZ d d� Zdd � Zdd� ZG dd� d�ZG dd� de�ZG dd� d�ZdS )z>This module contains decorators for use with and without D-Bus)�handle_exceptions�dbus_handle_exceptions�dbus_service_method� N)� DBusException)� FirewallError)�errors)�log)�FirewallDBusException�NotAuthorizedException)� uid_of_senderc s t �� �� fdd��}|S )zTDecorator to handle exceptions and log them. Used if not conneced to D-Bus. c sj z� | i |��W S t yL } z$t�t�� � t�|� W Y d }~n"d }~0 tyd t�� Y n0 d S �N)r r �debug1� traceback� format_exc�error� Exception� exception)�args�kwargsr ��func� �>/usr/lib/python3.9/site-packages/firewall/server/decorators.py�_impl0 s z handle_exceptions.<locals>._impl)� functools�wraps�r r r r r r , s r c s&