Added a simple check for the --accept parameter instead of -accept for LibreOffice on POSIX systems.
This commit is contained in:
parent
28c877c6fa
commit
42ab15c6d0
4
TODO
4
TODO
@ -1,7 +1,5 @@
|
|||||||
obasync TODO
|
obasync TODO
|
||||||
|
|
||||||
* LibreOffice switch (--xxx or -xxx)
|
* How to install with LibreOffice on MacOSX
|
||||||
* LibreOffice on MacOSX (how to install?)
|
|
||||||
* Linux system-bundled LibreOffice.
|
|
||||||
* Writes the README (reStructureText).
|
* Writes the README (reStructureText).
|
||||||
* Documentation.
|
* Documentation.
|
||||||
|
10
bin/obasync
10
bin/obasync
@ -358,10 +358,14 @@ class Office:
|
|||||||
"OpenOffice/LibreOffice installation.",
|
"OpenOffice/LibreOffice installation.",
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
param = "-accept=socket,host=localhost,port=%d;urp;" % \
|
||||||
|
self.port
|
||||||
|
# LibreOffice on POSIX systems uses --accept instead of
|
||||||
|
# -accept now.
|
||||||
|
if ooexec.lower().find("libreoffice") != -1:
|
||||||
|
param = "-" + param
|
||||||
try:
|
try:
|
||||||
os.execl(ooexec, ooexec,
|
os.execl(ooexec, ooexec, param)
|
||||||
"-accept=socket,host=localhost,port=%d;urp;" %
|
|
||||||
self.port)
|
|
||||||
except OSError:
|
except OSError:
|
||||||
print("%s: Failed to run the"
|
print("%s: Failed to run the"
|
||||||
" OpenOffice/LibreOffice server." % ooexec,
|
" OpenOffice/LibreOffice server." % ooexec,
|
||||||
|
Loading…
Reference in New Issue
Block a user