[blivet:master 5/9] Compress loop into generator list comprehension
Anne Mulhern
amulhern at redhat.com
Thu Apr 24 11:49:23 UTC 2014
----- Original Message -----
> From: "Anne Mulhern" <amulhern at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Thursday, April 24, 2014 7:42:42 AM
> Subject: Re: [blivet:master 5/9] Compress loop into generator list comprehension
>
>
>
>
>
> ----- Original Message -----
> > From: "Vratislav Podzimek" <vpodzime at redhat.com>
> > To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> > Sent: Thursday, April 24, 2014 1:45:54 AM
> > Subject: Re: [blivet:master 5/9] Compress loop into generator list
> > comprehension
> >
> > On Wed, 2014-04-23 at 17:49 -0400, mulhern wrote:
> > > There should be no semantic change.
> > >
> > > Signed-off-by: mulhern <amulhern at redhat.com>
> > > ---
> > > blivet/storage_log.py | 5 ++---
> > > 1 file changed, 2 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/blivet/storage_log.py b/blivet/storage_log.py
> > > index 2f430e9..0609d0b 100644
> > > --- a/blivet/storage_log.py
> > > +++ b/blivet/storage_log.py
> > > @@ -67,7 +67,6 @@ def log_exception_info(log_func=log.debug,
> > > fmt_str=None,
> > > fmt_args=None):
> > > log_func(fmt_str, spaces, *fmt_args)
> > > log_func("%sBegin exception details.", spaces)
> > > tb = traceback.format_exception(*sys.exc_info())
> > > - for entry in tb:
> > > - for line in [l for l in entry.split("\n") if l]:
> > > - log_func("%s %s", spaces, line.rstrip())
> > > + for line in (l.rstrip() for entry in tb for l in entry.split("\n")
> > > if
> > > l):
> > I'd swap the 'for entry...' and 'for l...' because the generated values
> > are l.rstrip().
> >
> > --
> > Vratislav Podzimek
> >
> > Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
> >
> > _______________________________________________
> > anaconda-patches mailing list
> > anaconda-patches at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> >
>
> Done.
>
> - mulhern
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
Sorry, that was accidental.
I'm not sure what you're asking for here.
- mulhern
More information about the anaconda-patches
mailing list