%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/certbot/_internal/display/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/certbot/_internal/display/__pycache__/util.cpython-312.pyc

�

M/�e�
����dZddlZddlZddlmZddlmZddlmZddl	m
Z
dedefd	�Zd
edefd�Z
ddeed
edefd�Zdedeefd�Zdeedefd�Zdej$defd�Zy)z#Internal Certbot display utilities.�N)�List)�Optional)�messages)�misc�msg�returnc	��|j�}g}|D]*}|jtj|ddd����,dj	|�S)z�Format lines nicely to 80 chars.

    :param str msg: Original message

    :returns: Formatted message respecting newlines in message
    :rtype: str

    �PF)�break_long_words�break_on_hyphens�
)�
splitlines�append�textwrap�fill�join)r�lines�fixed_l�lines    �@/usr/lib/python3/dist-packages/certbot/_internal/display/util.py�
wrap_linesrsX��
�N�N��E��G��%�����x�}�}���"�"�	$�	%�%��9�9�W����labelc�4�dj|d|dd��S)znPlace parens around first character of label.

    :param str label: Must contain at least one character

    z({first}){rest}r�N)�first�rest)�format)rs r�parens_around_charr!s$���#�#�%��(��q�r��#�C�Cr�prompt�timeoutc���|r=tjj|�tjj�t	j
||�}|st�|jd�S)aGet user input with a timeout.

    Behaves the same as the builtin 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�readline_with_timeout�EOFError�rstrip)r r!rs   r�input_with_timeoutr**sR��&��
�
���� ��
�
�����%�%�g�v�6�D�����;�;�t��r�input_c�~�|jdd�}|j�D�cgc]
}t|���c}Scc}w)z�Separate a comma or space separated list.

    :param str input_: input from the user

    :returns: strings
    :rtype: list

    �,� )�replace�split�str)r+�	no_commas�strings   r�separate_list_inputr4Hs5�����s�C�(�I�'0�o�o�&7�8�F�C��K�8�8��8s�:�domainsc��|syt|�}|dk(r|dS|dk(rdj|�Sdj|d|dz
�S)aMSummarizes a list of domains in the format of:
        example.com.com and N more domains
    or if there is are only two domains:
        example.com and www.example.com
    or if there is only one domain:
        example.com

    :param list domains: `str` list of domains
    :returns: the domain list summary
    :rtype: str
    �rr�z and z{0} and {1} more domains)�lenrr)r5�lengths  r�summarize_domain_listr;WsU����
��\�F�
��{��q�z��	�1���|�|�G�$�$�)�0�0����V�A�X�F�Fr�errorc��|j|jf}t|�rdjd�|D��S|jr|jS|j
S)z�Returns a human-readable description of an RFC7807 error.

    :param error: The ACME error
    :returns: a string describing the error, suitable for human consumption.
    :rtype: str
    z :: c3�&K�|]	}|��|���y�w)N�)�.0�parts  r�	<genexpr>z&describe_acme_error.<locals>.<genexpr>xs����F�D�T�5E�4�F�s��)�title�detail�anyr�description�typ)r<�partss  r�describe_acme_errorrIosQ���[�[�%�,�,�'�E�
�5�z��{�{�F�E�F�F�F����� � � ��9�9�r)Ng��@)�__doc__r#r�typingrr�acmer�
acme_messages�certbot.compatrr1rr�floatr*r4r;�ErrorrIr?rr�<module>rQs���)�
����*���C��C��,D�c�D�c�D��x��}��e��RU��<9��9��S�	�9�G�4��9�G��G�0�}�2�2��s�r

Zerion Mini Shell 1.0