[yum-cvs] yum cli.py,1.206,1.207

Seth Vidal skvidal at linux.duke.edu
Wed Feb 22 06:37:22 UTC 2006


Update of /home/groups/yum/cvs/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv18483

Modified Files:
	cli.py 
Log Message:

- remove useless log output
- make 'yum search' use searchGenerator()


Index: cli.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/cli.py,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -r1.206 -r1.207
--- cli.py	13 Jan 2006 06:07:15 -0000	1.206
+++ cli.py	22 Feb 2006 06:37:20 -0000	1.207
@@ -1213,9 +1213,14 @@
             args = self.extcmds
             
         searchlist = ['name', 'summary', 'description', 'packager', 'group', 'url']
-        matching = self.searchPackages(searchlist, args, callback=self.matchcallback)
-
-        if len(matching.keys()) == 0:
+        matching = self.searchGenerator(searchlist, args)
+        
+        total = 0
+        for (po, matched_value) in matching:
+            self.matchcallback(po, matched_value)
+            total += 1
+            
+        if total == 0:
             return 0, ['No Matches found']
         return 0, []
 




More information about the Yum-cvs-commits mailing list