From: Zack Cerza Date: Fri, 10 Mar 2017 23:32:00 +0000 (-0700) Subject: DaemonState: Add check_status() X-Git-Tag: 1.1.0~437^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=79372b34c0bd03c21c649b751d74b349d5e1c96d;p=teuthology.git DaemonState: Add check_status() So far, this just wraps self.proc.poll(). It's intended to provide a way for tasks to know if their daemons are even running. Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/daemon.py b/teuthology/orchestra/daemon.py index acbdf70e..df2cf3f6 100644 --- a/teuthology/orchestra/daemon.py +++ b/teuthology/orchestra/daemon.py @@ -135,6 +135,16 @@ class DaemonState(object): finally: self.proc = None + def check_status(self): + """ + Check to see if the process has exited. + + :returns: The exit status, if any + :raises: CommandFailedError, if the process was run with + check_status=True + """ + return self.proc.poll() + class DaemonGroup(object): """