repo_gen_decompress(cached=True) returns the name
of uncompressed file without checking/creating it.
That's probably fine, the '_db' path handles this.
Add an exists() check to 'xml' path, so RepoError
is raised instead of TypeError from y-m-p.
---
yum/yumRepo.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 02778dd..1196ae2 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -211,7 +211,7 @@ class YumPackageSack(packageSack.PackageSack):
# parser doesn't understand.
gen = mymdtype + '.xml'
ret = misc.repo_gen_decompress(xml, gen, cached=repo.cache)
- if not ret:
+ if not (ret and os.path.exists(ret)):
raise Errors.RepoError, '%s: Decompress DB failed' % repo
xml = ret
# Convert XML => .sqlite
--
1.7.11.7
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel