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