[yum-cvs] yum-utils repoquery.py,1.9,1.10
Panu Matilainen
pmatilai at login.linux.duke.edu
Thu Jun 9 18:14:09 UTC 2005
Update of /home/groups/yum/cvs/yum-utils
In directory login:/tmp/cvs-serv22525
Modified Files:
repoquery.py
Log Message:
Dont traceback on repo errors (eg cache out of date)
Index: repoquery.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/repoquery.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- repoquery.py 4 Jun 2005 19:37:47 -0000 1.9
+++ repoquery.py 9 Jun 2005 18:14:06 -0000 1.10
@@ -389,7 +389,7 @@
if len(regexs) < 1 and not opts.all:
parser.print_help()
- sys.exit(0)
+ sys.exit(1)
pkgops = []
sackops = []
@@ -453,14 +453,18 @@
repoq.doRepoSetup()
- repoq.doSackSetup(archlist=archlist)
- if needfiles:
- repoq.repos.populateSack(with='filelists')
- if needother:
- repoq.repos.populateSack(with='otherdata')
- if needgroup:
- repoq.doTsSetup()
- repoq.doGroupSetup()
+ try:
+ repoq.doSackSetup(archlist=archlist)
+ if needfiles:
+ repoq.repos.populateSack(with='filelists')
+ if needother:
+ repoq.repos.populateSack(with='otherdata')
+ if needgroup:
+ repoq.doTsSetup()
+ repoq.doGroupSetup()
+ except yum.Errors.RepoError, e:
+ repoq.errorlog(1, e)
+ sys.exit(1)
repoq.runQuery(regexs)
More information about the Yum-cvs-commits
mailing list