[blivet][master][PATCH] Multiple arguments for string formatting need to be in parentheses (#1100263)
Martin Kolman
mkolman at redhat.com
Fri May 23 12:33:27 UTC 2014
----- Original Message -----
> From: "Anne Mulhern" <amulhern at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Thursday, May 22, 2014 2:54:19 PM
> Subject: Re: [blivet][master][PATCH] Multiple arguments for string formatting need to be in parentheses (#1100263)
>
>
>
>
>
> ----- Original Message -----
> > From: "Martin Kolman" <mkolman at redhat.com>
> > To: anaconda-patches at lists.fedorahosted.org
> > Sent: Thursday, May 22, 2014 8:41:24 AM
> > Subject: [blivet][master][PATCH] Multiple arguments for string formatting
> > need to be in parentheses (#1100263)
> >
> > Signed-off-by: Martin Kolman <mkolman at redhat.com>
> > ---
> > blivet/devices.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/blivet/devices.py b/blivet/devices.py
> > index 4a68529..fcd2c2a 100644
> > --- a/blivet/devices.py
> > +++ b/blivet/devices.py
> > @@ -2955,7 +2955,7 @@ class LVMLogicalVolumeDevice(DMDevice):
> > try:
> > vg_info = lvm.vginfo(self.vg.name)
> > except errors.LVMError as lvmerr:
> > - msg = "Failed to get free space for the %s VG: %s" %
> > self.vg.name, lvmerr
> > + msg = "Failed to get free space for the %s VG: %s" %
> > (self.vg.name, lvmerr)
> > log.error(msg)
> > # nothing more can be done, we don't know the VG's free space
> > return
> > --
> > 1.9.0
> >
> > _______________________________________________
> > anaconda-patches mailing list
> > anaconda-patches at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> >
>
> Better to put the whole thing in
> log.error() as
>
> log.error("Failed to get free space for the %s VG: %s", self.vg.name, lvmerr)
>
> It's not just more efficient, it prevents the occasional exception being
> raised.
OK, fixing locally.
>
> - mulhern
>
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
More information about the anaconda-patches
mailing list