Bug#1106579: marked as done (unblock: python-certbot/4.0.0-2) (2/7)
From
Debian Bug Tracking System@21:1/5 to
All on Mon May 26 20:00:01 2025
[continued from previous message]
- unsafe_suggestion = ("\n\nIf 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.\n\n")
- if optional:
- if invalid:
- msg += unsafe_suggestion
- suggest_unsafe = False
- else:
- suggest_unsafe = True
- else:
- suggest_unsafe = False
+ # pylint: disable=unused-argument
+ invalid_prefix = ""
+ if invalid:
+ invalid_prefix = "The server reported a problem with your email address. "
+ msg = "Enter email address or hit Enter to skip.\n"
while True:
- try:
- code, email = display_util.input_text(invalid_prefix + msg if invalid else msg,
- force_interactive=True)
- except errors.MissingCommandlineFlag:
- msg = ("You should register before running non-interactively, "
- "or provide --agree-tos and --email <email_address> flags.")
- raise errors.MissingCommandlineFlag(msg)
+ code, email = display_util.input_text(invalid_prefix + msg, default="")
if code != display_util.OK:
- if optional:
- raise errors.Error(
- "An e-mail address or "
- "--register-unsafely-without-email must be provided.")
- raise errors.Error("An e-mail address must be provided.")
+ raise errors.Error("Error getting email address.")
+ if email == "":
+ return ""
if util.safe_email(email):
return email
- if suggest_unsafe:
- msg = unsafe_suggestion + msg
- suggest_unsafe = False # add this message at most once
-
- invalid = bool(email)
+ invalid_prefix = "There is a problem with your email address. "
def choose_account(accounts: List[account.Account]) -> Optional[account.Account]:
diff -Nru python-certbot-2.11.0/certbot/__init__.py python-certbot-4.0.0/certbot/__init__.py
--- python-certbot-2.11.0/certbot/__init__.py 2024-06-05 17:34:03.000000000 -0400
+++ python-certbot-4.0.0/certbot/__init__.py 2025-04-07 18:03:33.000000000 -0400
@@ -1,4 +1,4 @@
"""Certbot client."""
# version number like 1.2.3a0, must have at least 2 parts, like 1.2 -__version__ = '2.11.0'
+__version__ = '4.0.0'
diff -Nru python-certbot-2.11.0/certbot/_internal/account.py python-certbot-4.0.0/certbot/_internal/account.py
--- python-certbot-2.11.0/certbot/_internal/account.py 2024-06-05 17:34:02.000000000 -0400
+++ python-certbot-4.0.0/certbot/_internal/account.py 2025-04-07 18:03:33.000000000 -0400
@@ -223,7 +223,7 @@
key = jose.JWK.json_loads(key_file.read())
with open(self._metadata_path(account_dir_path)) as metadata_file:
meta = Account.Meta.json_loads(metadata_file.read())
- except IOError as error:
+ except OSError as error:
raise errors.AccountStorageError(error)
return Account(regr, key, meta)