Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
cloudooo
Commits
81eba22c
Commit
81eba22c
authored
5 years ago
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix start issue
parent
a23689c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
cloudooo/handler/ooo/application/application.py
cloudooo/handler/ooo/application/application.py
+8
-5
cloudooo/handler/ooo/application/openoffice.py
cloudooo/handler/ooo/application/openoffice.py
+7
-4
No files found.
cloudooo/handler/ooo/application/application.py
View file @
81eba22c
...
...
@@ -118,11 +118,14 @@ class Application(object):
self
.
start
(
init
=
False
)
def
status
(
self
):
"""Check by socket if the openoffice work."""
pid
=
self
.
pid
()
if
pid
is
None
or
not
pid_exists
(
pid
):
return
False
return
True
"""Check daemon running."""
if
hasattr
(
self
,
'process'
):
returncode
=
self
.
process
.
poll
()
if
returncode
is
None
or
returncode
==
0
:
return
True
if
pid_exists
(
self
.
process
.
pid
):
return
True
return
False
def
getAddress
(
self
):
"""Return port and hostname of OOo Instance."""
...
...
This diff is collapsed.
Click to expand it.
cloudooo/handler/ooo/application/openoffice.py
View file @
81eba22c
...
...
@@ -133,7 +133,8 @@ class OpenOffice(Application):
if
waitStartDaemon
(
self
,
self
.
timeout
-
1
):
if
self
.
last_test_error
:
logger
.
debug
(
self
.
last_test_error
)
break
return
True
return
False
def
getConnection
(
self
):
return
self
.
connection
...
...
@@ -175,9 +176,11 @@ class OpenOffice(Application):
env
[
"HOME"
]
=
self
.
path_user_installation
env
[
"TMP"
]
=
self
.
path_user_installation
env
[
"TMPDIR"
]
=
self
.
path_user_installation
self
.
_startProcess
(
self
.
command
,
env
)
self
.
_cleanRequest
()
Application
.
start
(
self
)
if
self
.
_startProcess
(
self
.
command
,
env
):
self
.
_cleanRequest
()
logger
.
debug
(
"%s libreoffice PID: %s started"
,
self
.
getConnection
(),
self
.
pid
())
else
:
logger
.
error
(
"%s libreoffice not started"
,
self
.
getConnection
())
def
stop
(
self
,
pid
=
None
):
"""Stop the instance by pid. By the default
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment