From a03ebb35cf16ee36daa64ed93f5c37ad27bd5412 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 17 Mar 2020 15:19:29 -0700 Subject: [PATCH] add debug, remove space --- certbot-apache/certbot_apache/_internal/configurator.py | 3 ++- certbot-apache/tests/configurator_test.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/certbot-apache/certbot_apache/_internal/configurator.py b/certbot-apache/certbot_apache/_internal/configurator.py index a70ab437b..80f91fbd2 100644 --- a/certbot-apache/certbot_apache/_internal/configurator.py +++ b/certbot-apache/certbot_apache/_internal/configurator.py @@ -242,7 +242,8 @@ class ApacheConfigurator(common.Installer): try: with open(ssl_module_location, mode="rb") as f: contents = f.read() - except IOError: + except IOError as error: + logger.debug(str(error), exc_info=True) return None return contents diff --git a/certbot-apache/tests/configurator_test.py b/certbot-apache/tests/configurator_test.py index a9af7c443..e42f67e27 100644 --- a/certbot-apache/tests/configurator_test.py +++ b/certbot-apache/tests/configurator_test.py @@ -1841,7 +1841,7 @@ class InstallSslOptionsConfTest(util.ApacheTest): def test_open_module_file(self): mock_open = mock.mock_open(read_data="testing 12 3") with mock.patch("six.moves.builtins.open", mock_open): - self.assertEqual (self.config._open_module_file("/nonsense/"), "testing 12 3") + self.assertEqual(self.config._open_module_file("/nonsense/"), "testing 12 3") if __name__ == "__main__": unittest.main() # pragma: no cover