---
yum/yumRepo.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 188a9ed..5a91fcd 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1577,7 +1577,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.
@@ -1615,7 +1615,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
@@ -1624,14 +1626,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
@@ -1641,9 +1644,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
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel