File: //lib/python3/dist-packages/certbot/_internal/__pycache__/reporter.cpython-310.pyc
o
6��a+
� @ sT d Z ddlZddlZddlZddlZddlZddlmZ e�e �Z
G dd� d�ZdS )z.Collects and displays information to the user.� N)�utilc @ sH e Zd ZdZdZ dZ dZ e�dd�Z dd� Z
dd
d�Zdd
� ZdS )�Reporterz�Collects and displays information to the user.
:ivar `queue.PriorityQueue` messages: Messages to be displayed to
the user.
r � � � _msg_typezpriority text on_crashc C s t �� | _|| _d S �N)�queue�
PriorityQueue�messages�config)�selfr � r
�</usr/lib/python3/dist-packages/certbot/_internal/reporter.py�__init__ s
zReporter.__init__Tc C sF | j | kr
| jksJ � J �| j�| �|||�� t�d|� dS )aX Adds msg to the list of messages to be printed.
:param str msg: Message to be displayed to the user.
:param int priority: One of `HIGH_PRIORITY`, `MEDIUM_PRIORITY`,
or `LOW_PRIORITY`.
:param bool on_crash: Whether or not the message should be
printed if the program exits abnormally.
zReporting to user: %sN)�
HIGH_PRIORITY�LOW_PRIORITYr
�putr �logger�debug)r �msg�priority�on_crashr
r
r �add_message"