ok
Direktori : /lib/python3.6/site-packages/certbot/display/__pycache__/ |
Current File : //lib/python3.6/site-packages/certbot/display/__pycache__/ops.cpython-36.pyc |
3 گas4 � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm Z dd lmZ ddlm Z ddlmZ dd lmZ ddlmZ dd lmZ ddlmZ dd lmZ eje�ZdAeeed�dd�Zeej e ej d�dd�ZdBee e e ee d�dd�Z dCe ej! e e ee d�dd�Z"ee ee d�dd �Z#ee ee d!�d"d#�Z$dDee e e eeee f d$�d%d&�Z%dEeee d(�d)d*�Z&e e dd�d+d,�Z'e e dd-�d.d/�Z(edd0�d1d2�Z)ee*eedd3�d4d5�Z+e e ed�d6d7�Z,dFed8eeef f eegef ee e eeeef d9�d:d;�Z-eegef eeeeef d<�d=d>�Z.eegef eeeeef d<�d?d@�Z/dS )Gz+Contains UI methods for LE user operations.� N)�indent)�Any)�Callable)�Iterable)�List)�Optional)�Sequence)�Tuple)�errors)� interfaces)�util)�account)�osFT)�invalid�optional�returnc C s� d}d}d}|r(| r"||7 }d}q,d}nd}x�y"t j| r@|| n|dd�\}}W n$ tjk rt d}tj|��Y nX |t jkr�|r�tjd��tjd ��tj|�r�|S |r�|| }d}t|�} q.W d S )aJ Prompt for valid email address. :param bool invalid: True if an invalid address was provided by the user :param bool optional: True if the user can use --register-unsafely-without-email to avoid providing an e-mail :returns: e-mail address :rtype: str :raises errors.Error: if the user cancels z-There seem to be problems with that address. zCEnter email address (used for urgent renewal and security notices) a If you really want to skip this, you can run the client with --register-unsafely-without-email but you will then be unable to receive notice about impending expiration or revocation of your certificates or problems with your Certbot installation that will lead to failure to renew. FT)�force_interactivezoYou should register before running non-interactively, or provide --agree-tos and --email <email_address> flags.zHAn e-mail address or --register-unsafely-without-email must be provided.z#An e-mail address must be provided.N) �display_util� input_textr ZMissingCommandlineFlag�OK�Errorr Z safe_email�bool)r r Zinvalid_prefix�msgZunsafe_suggestionZsuggest_unsafe�codeZemail� r �/usr/lib/python3.6/ops.py� get_email s6 r )�accountsr c C s8 dd� | D �}t jd|dd�\}}|t jkr4| | S dS )zChoose an account. :param list accounts: Containing at least one :class:`~certbot._internal.account.Account` c S s g | ] }|j �qS r )Zslug)�.0Zaccr r r � <listcomp>U s z"choose_account.<locals>.<listcomp>zPlease choose an accountT)r N)r Zmenur )r Zlabelsr �indexr r r �choose_accountM s r! )�values�questionr c C s2 t j|r|nd| dd�\}}|t jkr.|r.|S g S )a Display screen to let user pick one or multiple values from the provided list. :param list values: Values to select from :param str question: Question to ask to user while choosing values :returns: List of selected values :rtype: list � T)�tagsr )r � checklistr )r"