mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
Correctly handle None
This commit is contained in:
parent
2920e797c9
commit
ba8604a3df
3 changed files with 3 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue