Commit 0439fa69 authored by Gabriel Monnerat's avatar Gabriel Monnerat

return False if pid not exists

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@42265 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a86e8332
......@@ -29,7 +29,7 @@
from zope.interface import implements
from cloudooo.interfaces.application import IApplication
from cloudooo.utils.utils import logger
from cloudooo.handler.ooo.utils.utils import socketStatus, waitStopDaemon
from cloudooo.handler.ooo.utils.utils import waitStopDaemon
from psutil import pid_exists, Process, AccessDenied
......@@ -82,10 +82,10 @@ class Application(object):
def status(self):
"""Check by socket if the openoffice work."""
pid = self.pid()
if pid is None:
if pid is None or not pid_exists(pid):
return False
process = Process(pid)
try:
process.exe
except AccessDenied:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment