[Yum-devel] [PATCH] interrupt_callback=None: reraise instead of retrying
Zdeněk Pavlas
zpavlas at redhat.com
Wed Jun 13 10:25:03 UTC 2012
When yum fetches metalink.xml with _getMetalink(), we use
interrupt_callback=None and retry=10. Ctrl-C then starts
a new attempt, and user has to abort it 10 times.
An alternative is to fix this in _getMetalink() with a custom
interrupt callback (we should not reuse the default callback
that skips to the next mirror, as there are no mirrors),
but this is simpler and fixes all possible callers.
---
urlgrabber/grabber.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index c5470b1..799f4de 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -1028,6 +1028,8 @@ class URLGrabber(object):
except KeyboardInterrupt, e:
exception = e
callback = opts.interrupt_callback
+ if not callback:
+ raise
if DEBUG: DEBUG.info('exception: %s', exception)
if callback:
--
1.7.4.4
More information about the Yum-devel
mailing list