[PATCH] don't inject a space between each char in boot device name (#875652)

Samantha N. Bueno sbueno+anaconda at redhat.com
Wed Dec 5 14:23:25 UTC 2012


On Mon, Dec 03, 2012 at 09:53:05PM +0100, Vratislav Podzimek wrote:
> On Mon, 2012-12-03 at 11:46 -0500, Samantha N. Bueno wrote:
> > string.join() by default adds a space between each char/word unless
> > explicitly noted otherwise.
> > 
> > Resolves: rhbz#875652
> > ---
> >  booty/checkbootloader.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/booty/checkbootloader.py b/booty/checkbootloader.py
> > index d58df8e..c76b5bf 100644
> > --- a/booty/checkbootloader.py
> > +++ b/booty/checkbootloader.py
> > @@ -106,7 +106,7 @@ def getBootDevList(line):
> >      for dev in devs:
> >          dev = getBootDevString("=%s" % (dev,))
> >          rets.append(dev)
> > -    return string.join(rets)
> > +    return string.join(rets, "")
> Good point, but I'd rather see 
> 
> "".join(rets) 
> 
> here. Droping 'string' module import would be even better, but I guess
> that's a lot more work.

Hmm, bcl spoke to me in #anaconda about this actually. It turns out the
problem lay just a little further down than where my fix is.
The "for dev in devs:" block is unnecessary since it is splitting a
string that was already formatted correctly into an array of characters
(rets), hence the spaces between each one upon string.join().

Patch has been amended; adding it shortly.

Samantha


More information about the anaconda-patches mailing list