Remove needless unsafe registration warnings

This commit is contained in:
Brad Warren
2016-04-04 15:58:10 -07:00
parent d197123386
commit f93f1e5695
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -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(
+1
View File
@@ -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)