[yum-commits] urlgrabber/mirror.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Tue Jul 17 14:08:53 UTC 2012
urlgrabber/mirror.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit cb24ec1c7a03c89289375c0319168c9e9135eada
Author: ZdenÄk Pavlas <zpavlas at redhat.com>
Date: Tue Jul 17 15:32:32 2012 +0200
Strip 'failfunc' option only for synchronous base requests.
This fixes a bug introduced by the previous commit. Async urlgrab
can't raise exceptions, handles retries on it's own and calls
failfunc when all mirrors fail. Can't strip it unconditionally.
diff --git a/urlgrabber/mirror.py b/urlgrabber/mirror.py
index 0e3512e..675c2bf 100644
--- a/urlgrabber/mirror.py
+++ b/urlgrabber/mirror.py
@@ -258,7 +258,7 @@ class MirrorGroup:
# if these values are found in **kwargs passed to one of the urlXXX
# methods, they will be stripped before getting passed on to the
# grabber
- options = ['default_action', 'failure_callback', 'failfunc']
+ options = ['default_action', 'failure_callback']
def _process_kwargs(self, kwargs):
self.failure_callback = kwargs.get('failure_callback')
@@ -413,6 +413,8 @@ class MirrorGroup:
# enable mirror failovers in async path
kw['mirror_group'] = self, set()
kw['relative_url'] = url
+ else:
+ kw.pop('failfunc', None)
func = 'urlgrab'
try:
return self._mirror_try(func, url, kw)
More information about the Yum-commits
mailing list