From 2fdbb8430a8663233afe49852832643a47e55de8 Mon Sep 17 00:00:00 2001 From: Peter Eckersley Date: Fri, 23 Dec 2016 00:38:07 -0800 Subject: [PATCH] Don't log errors twice - They're already being logged down in util.run_script --- certbot/ocsp.py | 1 - certbot/tests/ocsp_test.py | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/certbot/ocsp.py b/certbot/ocsp.py index 213fe9e00..33a3619dc 100644 --- a/certbot/ocsp.py +++ b/certbot/ocsp.py @@ -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() diff --git a/certbot/tests/ocsp_test.py b/certbot/tests/ocsp_test.py index 6f59fe6c6..f64c38a33 100644 --- a/certbot/tests/ocsp_test.py +++ b/certbot/tests/ocsp_test.py @@ -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')