Interdiff: diff --git a/lib/utils/process.py b/lib/utils/process.py index 0e7c8a8..2521c58 100644 --- a/lib/utils/process.py +++ b/lib/utils/process.py @@ -790,6 +790,7 @@ def IsDaemonAlive(name): @rtype: boolean @return: True if daemon is running, False otherwise + """ return IsProcessAlive(utils_io.ReadPidFile(utils_io.DaemonPidFileName(name)))
Thanks, Jose On Fri, Jan 10, 2014 at 02:53:21PM +0100, Michele Tartara wrote: > On Fri, Jan 3, 2014 at 9:42 AM, Jose A. Lopes <[email protected]> wrote: > > Add helper function 'utils.IsDaemonAlive' to tell if a daemon is alive > > by name. This function will be necessary for the KVM hypervisor to > > determine if the KVM daemon is running and otherwise start it. > > > > Signed-off-by: Jose A. Lopes <[email protected]> > > --- > > lib/utils/process.py | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/lib/utils/process.py b/lib/utils/process.py > > index 4eef342..0e7c8a8 100644 > > --- a/lib/utils/process.py > > +++ b/lib/utils/process.py > > @@ -782,6 +782,18 @@ def IsProcessAlive(pid): > > err.RaiseInner() > > > > > > +def IsDaemonAlive(name): > > + """Determines whether a daemon is alive > > + > > + @type name: string > > + @param name: daemon name > > + > > + @rtype: boolean > > + @return: True if daemon is running, False otherwise > > + """ > Missing newline between @return and """ > Lint checks will fail. > > > + return > > IsProcessAlive(utils_io.ReadPidFile(utils_io.DaemonPidFileName(name))) > > + > > + > > def _ParseSigsetT(sigset): > > """Parse a rendered sigset_t value. > > > > -- > > 1.8.5.1 > > > > Rest LGTM. > > Thanks, > Michele > > > -- > Google Germany GmbH > Dienerstr. 12 > 80331 München > > Registergericht und -nummer: Hamburg, HRB 86891 > Sitz der Gesellschaft: Hamburg > Geschäftsführer: Graham Law, Christine Elizabeth Flores -- Jose Antonio Lopes Ganeti Engineering Google Germany GmbH Dienerstr. 12, 80331, München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores Steuernummer: 48/725/00206 Umsatzsteueridentifikationsnummer: DE813741370
