getMetalink and getFile (with absolute url) create a function
local URLGrabber instance.  This didn't work with 3rd party
plugins that override .grab and .grabfunc with custom objects.
---
 yum/yumRepo.py |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 8ef14a4..025edf9 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -714,10 +714,8 @@ class YumRepository(Repository, config.RepoConf):
             local = self.metalink_filename + '.tmp'
             if not self._metalinkCurrent():
                 url = misc.to_utf8(self.metalink)
-                ugopts = self._default_grabopts()
                 try:
-                    ug = URLGrabber(progress_obj = self.callback, **ugopts)
-                    result = ug.urlgrab(url, local, text=self.id + "/metalink")
+                    result = self.grabfunc.urlgrab(url, local, text=self.id + 
"/metalink")
 
                 except urlgrabber.grabber.URLGrabError, e:
                     if not os.path.exists(self.metalink_filename):
@@ -807,20 +805,10 @@ Insufficient space in download directory %s
                 ) % (os.path.dirname(local), format_number(avail), 
format_number(long(size)))
 
         if url and scheme != "media":
-            ugopts = self._default_grabopts(cache=cache)
-            ug = URLGrabber(progress_obj = self.callback,
-                            copy_local = copy_local,
-                            reget = reget,
-                            failure_callback = self.failure_obj,
-                            interrupt_callback=self.interrupt_callback,
-                            checkfunc=checkfunc,
-                            size=size,
-                            **ugopts)
-
             remote = url + '/' + relative
 
             try:
-                result = ug.urlgrab(misc.to_utf8(remote), local,
+                result = self.grabfunc.urlgrab(misc.to_utf8(remote), local,
                                     text=misc.to_utf8(text),
                                     range=(start, end),
                                     )
-- 
1.7.4.4

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to