forked from openlp/openlp
Only try to start the LibreOfficeServer if LibreOffice Python exists
This commit is contained in:
parent
704d9118a5
commit
52c92e434b
@ -67,6 +67,7 @@ class MacLOController(PresentationController):
|
||||
"""
|
||||
libreoffice_python = '/Applications/LibreOffice.app/Contents/Resources/python'
|
||||
libreoffice_server = os.path.join(os.path.dirname(__file__), 'libreofficeserver.py')
|
||||
if os.path.exists(libreoffice_python):
|
||||
self.server_process = Popen([libreoffice_python, libreoffice_server])
|
||||
|
||||
@property
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user