diff --git a/openlp/plugins/presentations/lib/maclocontroller.py b/openlp/plugins/presentations/lib/maclocontroller.py index 91b30d0c8..d35faa567 100644 --- a/openlp/plugins/presentations/lib/maclocontroller.py +++ b/openlp/plugins/presentations/lib/maclocontroller.py @@ -67,7 +67,8 @@ class MacLOController(PresentationController): """ libreoffice_python = '/Applications/LibreOffice.app/Contents/Resources/python' libreoffice_server = os.path.join(os.path.dirname(__file__), 'libreofficeserver.py') - self.server_process = Popen([libreoffice_python, libreoffice_server]) + if os.path.exists(libreoffice_python): + self.server_process = Popen([libreoffice_python, libreoffice_server]) @property def client(self): diff --git a/tests/functional/openlp_plugins/presentations/test_maclocontroller.py b/tests/functional/openlp_plugins/presentations/test_maclocontroller.py index b4948f7a7..ae24658df 100644 --- a/tests/functional/openlp_plugins/presentations/test_maclocontroller.py +++ b/tests/functional/openlp_plugins/presentations/test_maclocontroller.py @@ -70,6 +70,7 @@ class TestMacLOController(TestCase, TestMixin): mocked_process = MagicMock() mocked_os.path.join.side_effect = lambda *x: '/'.join(x) mocked_os.path.dirname.return_value = '' + mocked_os.path.exists.return_value = True MockedPopen.return_value = mocked_process # WHEN: The presentation controller object is created