← Back
Editing: ops.cpython-38.pyc
U �]1 � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddlm Z ddlmZ e� e�ZejjZd+d d�Zdd � Zd,dd�Zd-dd�Zdd� Zdd� Zd.dd�Zd/dd�Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd0d%d&�Z d'd(� Z!d)d*� Z"dS )1z+Contains UI methods for LE user operations.� N)�errors)� interfaces)�util)�misc)�osFTc C s� d}d}d� tj�t�d�d��}|r>| r8||7 }d}qBd}nd}z(ttj�j | rZ|| n|dd�\}}W n$ t jk r� d }t �|��Y nX |tj kr�|r�t �d ��q�t �d��nt�|�r�|S |r�||7 }d}t|�} qBdS ) 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. zBEnter email address (used for urgent renewal and security notices)z� If you really want to skip this, you can run the client with --register-unsafely-without-email but make sure you then backup your account key from {0} Zconfig�accountsFT��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)�formatr �path�joinr Zget_default_folder�z_utilr �IDisplay�inputr ZMissingCommandlineFlag�display_util�OK�Errorr Z safe_email�bool)ZinvalidZoptionalZinvalid_prefix�msgZunsafe_suggestionZsuggest_unsafe�codeZemail� r �5/usr/lib/python3/dist-packages/certbot/display/ops.py� get_email sD �� � � r c C s>