diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-02-19 22:14:57 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-02-19 22:14:57 +0000 |
commit | adbc448c3592af65b9ec8796f034d257e55523c4 (patch) | |
tree | 155b5e2bd97fae9501855e437790f2993cbe7a60 | |
parent | c359b93009a0f8f838e54034bfed1fda7715cee3 (diff) | |
download | portage-adbc448c3592af65b9ec8796f034d257e55523c4.tar.gz portage-adbc448c3592af65b9ec8796f034d257e55523c4.tar.bz2 portage-adbc448c3592af65b9ec8796f034d257e55523c4.zip |
Add stacklevel=2 to warnings.warn() calls.
svn path=/main/trunk/; revision=15405
-rw-r--r-- | pym/portage/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 654dc2c45..16fe15e48 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): @@ -8461,7 +8461,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]) |