/usr/lib/python3/dist-packages/certbot/display/__pycache__
Edit: /usr/lib/python3/dist-packages/certbot/display/__pycache__/ops.cpython-310.pyc (11199B)
o
6a 0
@ s d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ e
eZd/d d
Zdd Zd0d
dZd0ddZdd Zdd Zd0ddZd1ddZdd Zdd Zdd Zd ed!ed"ed#ed$df
d%d&Zd'd( Zd0d)d*Zd+d, Z d-d. Z!dS )2z+Contains UI methods for LE user operations. N)indent)errors)util)osFTc C s d}d}d}|r| r||7 }d}nd}nd} zt j| r || n|dd\}}W n tjy7 d}t|w |t jkrI|rDtdtd t|rP|S |rX|| }d}t|} q)
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.
FTforce_interactivezoYou should register before running non-interactively, or provide --agree-tos and --email
flags.zHAn e-mail address or --register-unsafely-without-email must be provided.z#An e-mail address must be provided.) display_util
input_textr MissingCommandlineFlagOKErrorr
safe_emailbool)invalidoptionalinvalid_prefixmsgunsafe_suggestionsuggest_unsafecodeemail r 5/usr/lib/python3/dist-packages/certbot/display/ops.py get_email s>
r c C s8 dd | D }t jd|dd\}}|t jkr| | S dS )zChoose an account.
:param list accounts: Containing at least one
:class:`~certbot._internal.account.Account`
c S s g | ]}|j qS r )slug).0accr r r
L s z"choose_account..zPlease choose an accountTr N)r menur )accountslabelsr indexr r r choose_accountD s
r" c C s* t j|| dd\}}|t jkr|r|S g S )zDisplay screen to let user pick one or multiple values from the provided
list.
:param list values: Values to select from
:returns: List of selected values
:rtype: list
T)tagsr )r checklistr )valuesquestionr itemsr r r
choose_valuesT s r( c C sZ | du rt d t S t| }t|}|st S t||\}}|tjkr+|r+|S g S )aQ Display screen to select domains to validate.
:param installer: An installer object
:type installer: :class:`certbot.interfaces.Installer`
:param `str` question: Overriding default question to ask the user if asked
to choose from domain names.
:returns: List of selected names
:rtype: `list` of `str`
Nz$No installer, picking names manually) loggerdebug_choose_names_manuallylist
get_all_namesget_valid_domains
_filter_namesr r ) installerr&