On Thu, Jul 01, 2010 at 11:56:56AM +0200, Iustin Pop wrote:
> On Wed, Jun 30, 2010 at 05:15:17PM +0100, Luca Bigliardi wrote:
> > Signed-off-by: Luca Bigliardi <[email protected]>
> > ---
> >  lib/backend.py   |    7 +++++++
> >  lib/constants.py |    1 +
> >  2 files changed, 8 insertions(+), 0 deletions(-)
> > 
> > diff --git a/lib/backend.py b/lib/backend.py
> > index 0e3c2e2..36eb2a4 100644
> > --- a/lib/backend.py
> > +++ b/lib/backend.py
> > @@ -584,6 +584,13 @@ def VerifyNode(what, cluster_name):
> >        used_minors = str(err)
> >      result[constants.NV_DRBDLIST] = used_minors
> >  
> > +  if constants.NV_DRBDHELPER in what:
> > +    try:
> > +      result[constants.NV_DRBDHELPER] = bdev.BaseDRBD.GetUsermodeHelper()
> > +    except errors.BlockDeviceError, err:
> > +      logging.info("Can't get DRBD usermode helper")
> 
> Please log this with error severity, and pass the exception too.

Actually, this is not LGTM. You're returning the error as a string too,
thus the caller gets either a path or an error message, in the same
variable. Please make this a (status, payload) return value.

iustin

Reply via email to