forked from openlp/openlp
Only try to start the LibreOfficeServer if LibreOffice Python exists
This commit is contained in:
parent
704d9118a5
commit
52c92e434b
@ -67,7 +67,8 @@ class MacLOController(PresentationController):
|
|||||||
"""
|
"""
|
||||||
libreoffice_python = '/Applications/LibreOffice.app/Contents/Resources/python'
|
libreoffice_python = '/Applications/LibreOffice.app/Contents/Resources/python'
|
||||||
libreoffice_server = os.path.join(os.path.dirname(__file__), 'libreofficeserver.py')
|
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
|
@property
|
||||||
def client(self):
|
def client(self):
|
||||||
|
@ -70,6 +70,7 @@ class TestMacLOController(TestCase, TestMixin):
|
|||||||
mocked_process = MagicMock()
|
mocked_process = MagicMock()
|
||||||
mocked_os.path.join.side_effect = lambda *x: '/'.join(x)
|
mocked_os.path.join.side_effect = lambda *x: '/'.join(x)
|
||||||
mocked_os.path.dirname.return_value = ''
|
mocked_os.path.dirname.return_value = ''
|
||||||
|
mocked_os.path.exists.return_value = True
|
||||||
MockedPopen.return_value = mocked_process
|
MockedPopen.return_value = mocked_process
|
||||||
|
|
||||||
# WHEN: The presentation controller object is created
|
# WHEN: The presentation controller object is created
|
||||||
|
Loading…
Reference in New Issue
Block a user