From 055d2045e76699e4b675c7e4e8c4369c3faaec0a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 19 Feb 2010 22:55:52 +0000 Subject: Add stacklevel=2 to warnings.warn calls. svn path=/main/trunk/; revision=15406 --- pym/portage/dbapi/bintree.py | 2 +- pym/portage/dbapi/porttree.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 6f164ccb9..ce162fccb 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -457,7 +457,7 @@ class binarytree(object): warnings.warn( "portage.dbapi.bintree.binarytree.populate(): " + \ "getbinpkgsonly parameter is deprecated", - DeprecationWarning) + DeprecationWarning, stacklevel=2) if self._populating: return diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index f40d94d0b..7cae96796 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -171,7 +171,7 @@ class portdbapi(dbapi): "portage.dbapi.porttree.portdbapi" + \ " constructor is now unused. Use " + \ "mysettings['PORTDIR'] instead.", - DeprecationWarning) + DeprecationWarning, stacklevel=2) # This is strictly for use in aux_get() doebuild calls when metadata # is generated by the depend phase. It's safest to use a clone for -- cgit v1.2.3-1-g7c22