diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-02-19 22:55:52 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-02-19 22:55:52 +0000 |
commit | 055d2045e76699e4b675c7e4e8c4369c3faaec0a (patch) | |
tree | 4ab7c2dc176f8368d4bba01a641cc1cda78105b3 | |
parent | adbc448c3592af65b9ec8796f034d257e55523c4 (diff) | |
download | portage-055d2045e76699e4b675c7e4e8c4369c3faaec0a.tar.gz portage-055d2045e76699e4b675c7e4e8c4369c3faaec0a.tar.bz2 portage-055d2045e76699e4b675c7e4e8c4369c3faaec0a.zip |
Add stacklevel=2 to warnings.warn calls.
svn path=/main/trunk/; revision=15406
-rw-r--r-- | pym/portage/dbapi/bintree.py | 2 | ||||
-rw-r--r-- | 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 |