[yum-cvs] yum/yum sqlitesack.py,1.20,1.21

Seth Vidal skvidal at login.linux.duke.edu
Thu Mar 24 07:29:41 UTC 2005


Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv30815/yum

Modified Files:
	sqlitesack.py 
Log Message:

fix for rh bug: 151950


Index: sqlitesack.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/sqlitesack.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- sqlitesack.py	18 Mar 2005 13:47:43 -0000	1.20
+++ sqlitesack.py	24 Mar 2005 07:29:39 -0000	1.21
@@ -24,7 +24,7 @@
 import types
 import repos
 from packages import YumAvailablePackage
-from repomd import mdUtils
+from repomd import mdUtils, mdErrors
 
 # Simple subclass of YumAvailablePackage that can load 'simple headers' from
 # the database when they are requested
@@ -407,7 +407,11 @@
                 if (self.excludes[rep].has_key(x.pkgId)):
                     continue                    
                 allpkg.append(self.pc(self.db2class(x,True),rep))
-        # Now find the newest one
+        
+        # if we've got zilch then raise
+        if not allpkg:
+            raise mdErrors.PackageSackError, 'No Package Matching %s.%s' % naTup
+        # Now find the newest one        
         newest = allpkg.pop()
         for pkg in allpkg:
             (e2, v2, r2) = newest.returnEVR()




More information about the Yum-cvs-commits mailing list