| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/certbot/display/__pycache__/ |
Upload File : |
a
�`f[ � @ s d Z ddlZddlZddlZddlZddlZddlmZ ddl m
Z
ddl mZ ddlm
Z
ddlmZ ddlmZ dd lmZ e�e�Zd
ZdZdZd
ZdZdZdd� Zd#dd�Zdd� Zej� ej!�G dd� de"��Z#dd� Z$ej� ej!�G dd� de"��Z%dd� Z&dd � Z'd!d"� Z(dS )$a$ Certbot display.
This module (`certbot.display.util`) or its companion `certbot.display.ops`
should be used whenever:
- Displaying status information to the user on the terminal
- Collecting information from the user via prompts
Other messages can use the `logging` module. See `log.py`.
� N)�List)�errors)�
interfaces)� constants)� completer)�misc)�os�H �okZcancel�helpZesczO- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -c C s8 | � � }g }|D ]}|�tj|dddd�� qd�|�S )z�Format lines nicely to 80 chars.
:param str msg: Original message
:returns: Formatted message respecting newlines in message
:rtype: str
�P F)Zbreak_long_wordsZbreak_on_hyphens�
)�
splitlines�append�textwrapZfill�join)�msg�linesZfixed_l�line� r �6/usr/lib/python3/dist-packages/certbot/display/util.py�_wrap_lines1 s �
r � ��@c C s8 | rt j�| � t j�� t�|| �}|s.t�|�d�S )a Get user input with a timeout.
Behaves the same as six.moves.input, however, an error is raised if
a user doesn't answer after timeout seconds. The default timeout
value was chosen to place it just under 12 hours for users following
our advice and running Certbot twice a day.
:param str prompt: prompt to provide for input
:param float timeout: maximum number of seconds to wait for input
:returns: user response
:rtype: str
:raises errors.Error if no answer is given before the timeout
r
)�sys�stdout�write�flushr Zreadline_with_timeout�EOFError�rstrip)�promptZtimeoutr r r r �input_with_timeoutG s
r c C s t j�tj�j| dddd� dS )zMDisplay a basic status message.
:param str msg: message to display
F)�pause�decorate�wrapN)�zopeZ componentZ
getUtilityr �IDisplay�notification)r r r r �notifye s �r'