[Yum-devel] [PATCH] Catch error opening repo files
James Antill
james at fedoraproject.org
Wed May 13 18:46:20 UTC 2009
On Wed, 2009-05-13 at 14:16 -0400, Jeremy Katz wrote:
> Rather than requiring higher level callers to catch the error,
> we should catch the error at the low-level when opening the
> repo file and turn it into a RepoMDError. Related to
> rh bz#500526
Not that I think this change is bad, but I don't see how the it fails
atm. bz#500526 has:
Traceback (most recent call first):
File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 84, in __init__
infile = open(srcfile, 'rt')
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 958, in _parseRepoXML
return repoMDObject.RepoMD(self.id, local)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1158, in _commonLoadRepoXML
self._repoXML = self._parseRepoXML(result)
...but it should only get to that _parseRepoXML() line if
_cachingRepoXML() returns true (repomd.xml is on the FS and within the
cache timeout) or _getFileRepoXML() returns with data (file
"downloaded", and thus. is on the FS).
--
James Antill <james at fedoraproject.org>
Fedora
More information about the Yum-devel
mailing list