[ovs-dev] [restart 2/3] daemon: Avoid redundant code in already_running().
Ben Pfaff
blp at nicira.com
Tue Mar 29 16:34:27 UTC 2011
On Mon, Mar 28, 2011 at 10:27:58PM -0700, Justin Pettit wrote:
> On Mar 28, 2011, at 4:24 PM, Ben Pfaff wrote:
>
> > diff --git a/python/ovs/daemon.py b/python/ovs/daemon.py
> > index 6240e0d..c8af043 100644
> > --- a/python/ovs/daemon.py
> > +++ b/python/ovs/daemon.py
> > @@ -139,7 +139,10 @@ def _already_running():
> > def die_if_already_running():
> > """If a locked pidfile exists, issue a warning message and, unless
> > ignore_existing_pidfile() has been called, terminate the program."""
> > - if _already_running():
> > + if _pidfile is None:
> > + return
> > + pid = read_pidfile_if_exists(_pidfile)
>
> Ah, here it is... I think the previous commit depends on this declaration of "pid".
Yes, that was dumb.
I adjusted this patch to be the one that updates the message.
I'll just repost the whole series since it's short.
More information about the dev
mailing list