certbot.display.ops module¶
Contains UI methods for LE user operations.
- certbot.display.ops.get_email(invalid=False, optional=True)[source]¶
Prompt for valid email address.
- Parameters
invalid (bool) – True if an invalid address was provided by the user
optional (bool) – True if the user can use –register-unsafely-without-email to avoid providing an e-mail
- Returns
e-mail address
- Return type
str
- Raises
errors.Error – if the user cancels
- certbot.display.ops.choose_account(accounts)[source]¶
Choose an account.
- Parameters
accounts (list) – Containing at least one
Account
- certbot.display.ops.choose_values(values, question=None)[source]¶
Display screen to let user pick one or multiple values from the provided list.
- Parameters
values (list) – Values to select from
- Returns
List of selected values
- Return type
list
- certbot.display.ops.choose_names(installer, question=None)[source]¶
Display screen to select domains to validate.
- Parameters
installer (
certbot.interfaces.IInstaller
) – An installer objectquestion (str) – Overriding default question to ask the user if asked to choose from domain names.
- Returns
List of selected names
- Return type
list
ofstr
- certbot.display.ops.get_valid_domains(domains)[source]¶
- Helper method for choose_names that implements basic checks
on domain names
- Parameters
domains (list) – Domain names to validate
- Returns
List of valid domains
- Return type
list
- certbot.display.ops.success_installation(domains)[source]¶
Display a box confirming the installation of HTTPS.
- Parameters
domains (list) – domain names which were enabled
- certbot.display.ops.success_renewal(unused_domains)[source]¶
Display a box confirming the renewal of an existing certificate.
- Parameters
domains (list) – domain names which were renewed
- certbot.display.ops.success_revocation(cert_path)[source]¶
Display a message confirming a certificate has been revoked.
- Parameters
cert_path (list) – path to certificate which was revoked.
- certbot.display.ops.report_executed_command(command_name: str, returncode: int, stdout: str, stderr: str) None [source]¶
Display a message describing the success or failure of an executed process (e.g. hook).
- Parameters
command_name (str) – Human-readable description of the executed command
returncode (int) – The exit code of the executed command
stdout (str) – The stdout output of the executed command
stderr (str) – The stderr output of the executed command
- certbot.display.ops.validated_input(validator, *args, **kwargs)[source]¶
Like
input
, but with validation.- Parameters
validator (callable) – A method which will be called on the supplied input. If the method raises an
errors.Error
, its text will be displayed and the user will be re-prompted.*args (list) – Arguments to be passed to
input
.**kwargs (dict) – Arguments to be passed to
input
.
- Returns
as
input
- Return type
tuple
- certbot.display.ops.validated_directory(validator, *args, **kwargs)[source]¶
Like
directory_select
, but with validation.- Parameters
validator (callable) – A method which will be called on the supplied input. If the method raises an
errors.Error
, its text will be displayed and the user will be re-prompted.*args (list) – Arguments to be passed to
directory_select
.**kwargs (dict) – Arguments to be passed to
directory_select
.
- Returns
as
directory_select
- Return type
tuple