[yum-cvs] yum/yum rpmsack.py,1.44,1.45

Jeremy Katz katzj at linux.duke.edu
Tue Apr 17 20:32:30 UTC 2007


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

Modified Files:
	rpmsack.py 
Log Message:
raise error instead of printing when there's not a package in the rpmdb.  this
makes the API the same as that of all the other package sacks


Index: rpmsack.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/rpmsack.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- rpmsack.py	8 Apr 2007 20:40:18 -0000	1.44
+++ rpmsack.py	17 Apr 2007 20:32:28 -0000	1.45
@@ -177,8 +177,7 @@
             for (hdr, pkgtup, idx) in self._search(name=name, arch=arch) ]
 
         if not allpkg:
-            # FIXME: raise  ...
-            print 'No Package Matching %s' % name
+            raise Errors.PackageSackError, 'No Package Matching %s' % name
 
         return misc.newestInList(allpkg)
 
@@ -190,8 +189,7 @@
             for (hdr, pkgtup, idx) in self._search(name=name) ]
 
         if not allpkg:
-            # FIXME: raise  ...
-            print 'No Package Matching %s' % name
+            raise Errors.PackageSackError, 'No Package Matching %s' % name
 
         return misc.newestInList(allpkg)
 




More information about the Yum-cvs-commits mailing list