Am 3. September 2010 13:17 schrieb Manuel Franceschini <[email protected]>:
> --- a/lib/backend.py
> +++ b/lib/backend.py
> @@ -306,7 +306,10 @@ def StartMaster(start_daemons, no_voting):
>         utils.RunCmd(["arping", "-q", "-U", "-c 3", "-I", master_netdev, "-s",
>                       master_ip, master_ip])
>       elif ipcls == netutils.IP6Address:
> -        utils.RunCmd(["ndisc6", "-q", "-r 3", master_ip, master_netdev])
> +        try:
> +          utils.RunCmd(["ndisc6", "-q", "-r 3", master_ip, master_netdev])
> +        except errors.OpExecError:
> +          logging.warning("Can't execute ndisc6, please install if missing")

IIRC, RunCmd doesn't raise an exception. Use its return value and
include error code and message in the log message. See other places
where RunCmd is used.

Michael

Reply via email to