add debug, remove space

This commit is contained in:
Erica Portnoy 2020-03-17 15:19:29 -07:00
parent 34691fe558
commit a03ebb35cf
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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