File: //usr/lib/python3.9/site-packages/certbot/_internal/display/__pycache__/obj.cpython-39.pyc
a
}|�g4X � @ s0 d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm
Z
dd
lmZ ddlm
Z
ddlmZ dd
lmZ ddlmZ ddlmZ e�e�ZdZdZdZG dd� d�Ze� Ze
d�ZG dd� d�ZG dd� d�Zeeef d�dd�Z eeef dd�dd�Z!dS ) zFThis modules define the actual display implementations used in Certbot� N)�Any)�Iterable)�List)�Optional)�TextIO)�Tuple)�TypeVar)�Union)�errors)� constants)� completer)�util)�os�ok�cancelzO- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -c @ s e Zd Zdd�dd�ZdS )�_DisplayServiceN��returnc C s
d | _ d S �N��display)�self� r �A/usr/lib/python3.9/site-packages/certbot/_internal/display/obj.py�__init__) s z_DisplayService.__init__)�__name__�
__module__�__qualname__r r r r r r ( s r �Tc
s� e Zd ZdZeedd�� fdd�Zd*eeeeedd�d d
�Zd+ee e
eeef e
e f ee ee ee ee
ee eeeee
f d�
dd
�Zd,eee ee eeeeef d�dd�Zd-eeeee ee eeed�dd�Zd.ee
e ee
e ee eeeee
e f d�dd�Zeee ee eee d�dd�Zeed�dd�Zd/eee ee eeeeef d�dd �Zee ee
f e
e e
e d!�d"d#�Zee e
eeef e
e f dd$�d%d&�Ze
eee
f d'�d(d)�Z� ZS )0�FileDisplayzFile-based display.N)�outfile�force_interactiver c s t � �� || _|| _d| _d S )NF)�superr r r! �skipped_interaction)r r r! �� __class__r r r 6 s
zFileDisplay.__init__TF)�message�pause�wrapr! �decorater c C s~ |rt �|�}t�d|� | j�|r(dndd |r6dnd jtjt |d�� | j�
� |rz| �|�rpt �d� n
t�d� d S )
a Displays a notification and waits for user acceptance.
:param str message: Message to display
:param bool pause: Whether or not the program should pause for the
user's confirmation
:param bool wrap: Whether or not the application should wrap text
:param bool force_interactive: True if it's safe to prompt the user
because it won't cause any workflow regressions
:param bool decorate: Whether to surround the message with a
decorated frame
�Notifying user: %s�{line}{frame}{line}� �{msg}{line}�
{frame}{line}��line�frame�msgzPress Enter to Continuez!Not pausing for user confirmationN)
r
�
wrap_lines�logger�debugr �write�formatr �linesep�
SIDE_FRAME�flush�
_can_interact�input_with_timeout)r r&