[ovs-dev] [restart v2 2/3] daemon: Avoid redundant code in already_running().

Justin Pettit jpettit at nicira.com
Tue Mar 29 09:56:49 PDT 2011


On Mar 29, 2011, at 9:36 AM, Ben Pfaff wrote:

> +    pid = read_pidfile_if_exists(_pidfile)
> +    if pid > 0:
>         if not _overwrite_pidfile:
> -            msg = "%s: already running" % _pidfile
> -            logging.error(msg)
> +            msg = "%s: already running as pid %d" % (_pidfile, pid)
> +            logging.error("%s, aborting" % msg)
>             sys.stderr.write("%s\n" % msg)
>             sys.exit(1)

This is really minor, but is there a reason to only log "aborting" in this patch and not the previous one, since I don't believe the behavior has changed?

Otherwise, the series looks good.

Thanks,

--Justin





More information about the dev mailing list