[yum-cvs] yum/yum rpmsack.py,1.13,1.14

Jeremy Katz katzj at linux.duke.edu
Mon Aug 21 16:56:01 UTC 2006


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

Modified Files:
	rpmsack.py 
Log Message:
make the warnings give the useful stackframe


Index: rpmsack.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/rpmsack.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- rpmsack.py	20 Aug 2006 14:43:53 -0000	1.13
+++ rpmsack.py	21 Aug 2006 16:55:59 -0000	1.14
@@ -320,13 +320,13 @@
     def getPkgList(self):
         warnings.warn('getPkgList() will go away in a future version of Yum.\n'
                 'Please access this via the pkglist attribute.',
-                DeprecationWarning)
+                DeprecationWarning, stacklevel=2)
     
         return self.pkglist
 
     def getHdrList(self):
         warnings.warn('getHdrList() will go away in a future version of Yum.\n',
-                DeprecationWarning)
+                DeprecationWarning, stacklevel=2)
     
         hdrlist = []
         for pkg in self.header_indexes.keys():
@@ -337,7 +337,7 @@
 
     def getNameArchPkgList(self):
         warnings.warn('getNameArchPkgList() will go away in a future version of Yum.\n',
-                DeprecationWarning)
+                DeprecationWarning, stacklevel=2)
     
         lst = []
         for (name, arch, epoch, ver, rel) in self.pkglists:
@@ -348,7 +348,7 @@
         
     def getNamePkgList(self):
         warnings.warn('getNamePkgList() will go away in a future version of Yum.\n',
-                DeprecationWarning)
+                DeprecationWarning, stacklevel=2)
     
         lst = []
         for (name, arch, epoch, ver, rel) in self.pkglists:
@@ -359,7 +359,7 @@
     
     def returnTupleByKeyword(self, name=None, arch=None, epoch=None, ver=None, rel=None):
         warnings.warn('returnTuplebyKeyword() will go away in a future version of Yum.\n',
-                DeprecationWarning)
+                DeprecationWarning, stacklevel=2)
     
         lst = self.searchNevra(name=name, arch=arch, epoch=epoch, ver=ver, rel=rel)
         returnlist = []
@@ -370,7 +370,7 @@
 
     def returnHeaderByTuple(self, pkgtuple):
         warnings.warn('returnHeaderByTuple() will go away in a future version of Yum.\n',
-                DeprecationWarning)
+                DeprecationWarning, stacklevel=2)
         """returns a list of header(s) based on the pkgtuple provided"""
         
         (n, a, e, v, r) = pkgtuple
@@ -385,7 +385,7 @@
 
     def returnIndexByTuple(self, pkgtuple):
         warnings.warn('returnIndexbyTuple() will go away in a future version of Yum.\n',
-                DeprecationWarning)
+                DeprecationWarning, stacklevel=2)
         """returns a list of header indexes based on the pkgtuple provided"""
         
         if self.header_indexes.has_key(pkgtuple):
@@ -395,7 +395,7 @@
         
     def addDB(self, ts):
         warnings.warn('addDB()() will go away in a future version of Yum.\n',
-                DeprecationWarning)
+                DeprecationWarning, stacklevel=2)
     
         self.ts = ts
         self.buildIndexes()




More information about the Yum-cvs-commits mailing list