mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
Remove needless unsafe registration warnings
This commit is contained in:
@@ -105,7 +105,8 @@ def register(config, account_storage, tos_cb=None):
|
||||
"--register-unsafely-without-email was not present.")
|
||||
logger.warn(msg)
|
||||
raise errors.Error(msg)
|
||||
logger.warn("Registering without email!")
|
||||
if not config.dry_run:
|
||||
logger.warn("Registering without email!")
|
||||
|
||||
# Each new registration shall use a fresh new key
|
||||
key = jose.JWKRSA(key=jose.ComparableRSAKey(
|
||||
|
||||
@@ -80,6 +80,7 @@ class RegisterTest(unittest.TestCase):
|
||||
with mock.patch("letsencrypt.account.report_new_account"):
|
||||
self.config.email = None
|
||||
self.config.register_unsafely_without_email = True
|
||||
self.config.dry_run = False
|
||||
self._call()
|
||||
mock_logger.warn.assert_called_once_with(mock.ANY)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user