mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:35:50 +02:00
Correctly handle None
This commit is contained in:
@@ -381,7 +381,7 @@ def determine_authenticator(all_auths):
|
||||
else:
|
||||
raise errors.LetsEncryptClientError("No Authenticators available.")
|
||||
|
||||
if auth and auth in errs:
|
||||
if auth is not None and auth in errs:
|
||||
logging.error("Please fix the configuration for the Authenticator. "
|
||||
"The following error message was received: "
|
||||
"%s", errs[auth])
|
||||
|
||||
@@ -59,7 +59,7 @@ class DetermineAuthenticatorTest(unittest.TestCase):
|
||||
errors.LetsEncryptMisconfigurationError)
|
||||
mock_choose.return_value = self.mock_apache
|
||||
|
||||
self.assertEqual(self._call(self.all_auths), None)
|
||||
self.assertTrue(self._call(self.all_auths) is None)
|
||||
|
||||
|
||||
class RollbackTest(unittest.TestCase):
|
||||
|
||||
@@ -51,7 +51,7 @@ class ChooseAuthenticatorTest(unittest.TestCase):
|
||||
def test_no_choice(self, mock_util):
|
||||
mock_util().menu.return_value = (display_util.CANCEL, 0)
|
||||
|
||||
self.assertEqual(self._call(self.auths, {}), None)
|
||||
self.assertTrue(self._call(self.auths, {}) is None)
|
||||
|
||||
|
||||
class GenHttpsNamesTest(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user