mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
Don't log errors twice
- They're already being logged down in util.run_script
This commit is contained in:
parent
21287b414f
commit
2fdbb8430a
2 changed files with 1 additions and 4 deletions
|
|
@ -82,7 +82,6 @@ class RevocationChecker(object):
|
|||
log=logging.debug)
|
||||
except errors.SubprocessError as e:
|
||||
logger.info("Cannot extract OCSP URI from %s", cert_path)
|
||||
logger.debug("Error was:\n%s", e)
|
||||
return None, None
|
||||
|
||||
url = url.rstrip()
|
||||
|
|
|
|||
|
|
@ -73,10 +73,9 @@ class OCSPTest(unittest.TestCase):
|
|||
self.assertEqual(mock_run.call_count, 2)
|
||||
|
||||
|
||||
@mock.patch('certbot.ocsp.logger.debug')
|
||||
@mock.patch('certbot.ocsp.logger.info')
|
||||
@mock.patch('certbot.util.run_script')
|
||||
def test_determine_ocsp_server(self, mock_run, mock_info, mock_debug):
|
||||
def test_determine_ocsp_server(self, mock_run, mock_info):
|
||||
uri = "http://ocsp.stg-int-x1.letsencrypt.org/"
|
||||
host = "ocsp.stg-int-x1.letsencrypt.org"
|
||||
mock_run.return_value = uri, ""
|
||||
|
|
@ -88,7 +87,6 @@ class OCSPTest(unittest.TestCase):
|
|||
c = "confusion"
|
||||
mock_run.side_effect = errors.SubprocessError(c)
|
||||
self.assertEqual(self.checker.determine_ocsp_server("beep"), (None, None))
|
||||
self.assertTrue(c in repr(mock_debug.call_args[0][1]))
|
||||
|
||||
@mock.patch('certbot.ocsp.logger')
|
||||
@mock.patch('certbot.util.run_script')
|
||||
|
|
|
|||
Loading…
Reference in a new issue