[yum-commits] package-cleanup.py
Tim Lauridsen
timlau at osuosl.org
Sun May 2 08:35:09 UTC 2010
package-cleanup.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit c5aa6845f4b0cf6ffbc0e725b9cff108e1dd3d58
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Sun May 2 12:35:02 2010 +0200
catch yum exception in --orphans (rhbz #582039)
diff --git a/package-cleanup.py b/package-cleanup.py
index 031d298..bb9b669 100755
--- a/package-cleanup.py
+++ b/package-cleanup.py
@@ -364,9 +364,12 @@ class PackageCleanup(YumUtilBase):
if not self.setCacheDir():
self.logger.error("Error: Could not make cachedir, exiting")
sys.exit(50)
-
- for po in sorted(self.doPackageLists(pkgnarrow='extras').extras):
- print po.hdr.sprintf(opts.qf)
+ try:
+ for po in sorted(self.doPackageLists(pkgnarrow='extras').extras):
+ print po.hdr.sprintf(opts.qf)
+ except YumBaseError,e:
+ self.logger.error("Error: %s" % str(e))
+ sys.exit(1)
sys.exit(0)
More information about the Yum-commits
mailing list