[master][PATCH] Package download retry NG

Vratislav Podzimek vpodzime at redhat.com
Fri Feb 14 06:42:26 UTC 2014


On Wed, 2014-02-12 at 16:52 -0800, Brian C. Lane wrote:
> On Wed, Feb 12, 2014 at 04:51:10PM +0100, Martin Kolman wrote:
> > NG = Now with Generators! :)
> > 
> > Based on suggestion from Vratislav, I've decided to convert the
> > master version of the patch to use generators and to move the
> > delay generator to iutil, so it can be easily used in other
> > parts of Anaconda.
> > 
> > For now it is called xprogressive_delay (inspired by the xrange function),
> > but I'm pretty much open for other naming suggestions.
> > 
> > Martin Kolman (1):
> >   Properly retry package downloads (#924860)
> > 
> >  pyanaconda/iutil.py  | 14 ++++++++
> >  scripts/anaconda-yum | 95 +++++++++++++++++++++++++++++++++++++++++-----------
> >  2 files changed, 90 insertions(+), 19 deletions(-)
> 
> I'm not sure this better -- to me it makes more sense as a function, and
> the return values are easier to discover.
I must say I like this version more than the one with the function. The
generator is simpler than the function, it could be a little bit faster
(not that it matters in this case) and the code is better readable with
it to me. However, both versions are easily understandable to me so
it's up to you guys.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list