summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-02 20:46:56 +0000
committerZac Medico <zmedico@gentoo.org>2010-03-02 20:46:56 +0000
commit4233d85cea9b7fd682f66be21e450f45d2c782d1 (patch)
treeaf671ef503e9b2b0f5e1099c6f30b7931d5e8498 /pym
parent3d7d91038667a234c8fd41b5e3a7454eb4ae51da (diff)
downloadportage-4233d85cea9b7fd682f66be21e450f45d2c782d1.tar.gz
portage-4233d85cea9b7fd682f66be21e450f45d2c782d1.tar.bz2
portage-4233d85cea9b7fd682f66be21e450f45d2c782d1.zip
Add stacklevel=2 to warnings.warn() calls. (trunk r15405)
svn path=/main/branches/2.1.7/; revision=15627
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 1fe8b3d44..1853aff5f 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3680,7 +3680,7 @@ class config(object):
def has_key(self,mykey):
warnings.warn("portage.config.has_key() is deprecated, "
"use the in operator instead",
- DeprecationWarning)
+ DeprecationWarning, stacklevel=2)
return mykey in self
def __contains__(self, mykey):
@@ -8458,7 +8458,7 @@ def cpv_getkey(mycpv):
return mysplit[0] + '/' + mysplit[1]
warnings.warn("portage.cpv_getkey() called with invalid cpv: '%s'" \
- % (mycpv,), DeprecationWarning)
+ % (mycpv,), DeprecationWarning, stacklevel=2)
myslash = mycpv.split("/", 1)
mysplit = versions._pkgsplit(myslash[-1])