File: //proc/676643/root/lib/python3/dist-packages/apparmor/__pycache__/fail.cpython-310.pyc
o
%`b � @ sT d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ dd� Z dd� Z
dS )� )�print_functionN)�errorc G s� | \}}}|j dkrtdtjd� t|j� dS tjddd�\}}t� |d�}t
jd|d d
d�}|�| � |�
d� |�
d
� td�tj| � �tjd� tdtjd� tdtjd� tdtjd� td| tjd� tdtjd� tdtjd� dS )ay Used as exception handler in the aa-* tools.
For AppArmorException (used for profile syntax errors etc.), print only the exceptions
value because a backtrace is superfluous and would confuse users.
For other exceptions, print backtrace and save detailed information in a file in /tmp/
(including variable content etc.) to make debugging easier.
�AppArmorException� )�filezapparmor-bugreport-z.txt)�prefix�suffix�w� �text�
)�displayr �format�contextzQPlease consider reporting a bug at https://gitlab.com/apparmor/apparmor/-/issues
zand attach this file.
zAn unexpected error occoured!zFor details, see %szPPlease consider reporting a bug at https://gitlab.com/apparmor/apparmor/-/issueszand attach this file.N)�__name__�print�sys�stderrr �value�tempfile�mkstemp�os�fdopen�cgitb�Hook�handle�write�join� traceback�format_exception)�exc_info�ex_cls�ex�tb�fd�pathr �
cgitb_hook� r'