---
 yum/yumRepo.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 18fc37c..0f0750e 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1459,7 +1459,7 @@ Insufficient space in download directory %s
            mdtype can be 'primary', 'filelists', 'other' or 'group'."""
         return self._retrieveMD(mdtype)
 
-    def _retrieveMD(self, mdtype, retrieve_can_fail=False):
+    def _retrieveMD(self, mdtype, retrieve_can_fail=False, **kwargs):
         """ Internal function, use .retrieveMD() from outside yum. """
         #  Note that this can raise Errors.RepoMDError if mdtype doesn't exist
         # for this repo.
@@ -1497,7 +1497,9 @@ Insufficient space in download directory %s
                 return local # it's the same return the local one
 
         try:
-            checkfunc = (self.checkMD, (mdtype,), {})
+            def checkfunc(obj):
+                self.checkMD(obj, mdtype)
+                self.retrieved[mdtype] = 1
             text = "%s/%s" % (self.id, mdtype)
             if thisdata.size is None:
                 reget = None
@@ -1506,14 +1508,15 @@ Insufficient space in download directory %s
                 if os.path.exists(local):
                     if os.stat(local).st_size >= int(thisdata.size):
                         misc.unlink_f(local)
-            local = self._getFile(relative=remote,
+            return  self._getFile(relative=remote,
                                   local=local, 
                                   copy_local=1,
                                   reget=reget,
                                   checkfunc=checkfunc, 
                                   text=text,
                                   cache=self.http_caching == 'all',
-                                  size=thisdata.size)
+                                  size=thisdata.size,
+                                  **kwargs)
         except Errors.RepoError:
             if retrieve_can_fail:
                 return None
@@ -1523,9 +1526,6 @@ Insufficient space in download directory %s
                 return None
             raise Errors.RepoError, \
                 "Could not retrieve %s matching remote checksum from %s" % 
(local, self)
-        else:
-            self.retrieved[mdtype] = 1
-            return local
 
 
     def getPrimaryXML(self):
-- 
1.7.4.4

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to