1 |
Author: zmedico |
2 |
Date: 2010-02-19 22:14:57 +0000 (Fri, 19 Feb 2010) |
3 |
New Revision: 15405 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/__init__.py |
7 |
Log: |
8 |
Add stacklevel=2 to warnings.warn() calls. |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/portage/__init__.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/portage/__init__.py 2010-02-19 22:09:15 UTC (rev 15404) |
14 |
+++ main/trunk/pym/portage/__init__.py 2010-02-19 22:14:57 UTC (rev 15405) |
15 |
@@ -3680,7 +3680,7 @@ |
16 |
def has_key(self,mykey): |
17 |
warnings.warn("portage.config.has_key() is deprecated, " |
18 |
"use the in operator instead", |
19 |
- DeprecationWarning) |
20 |
+ DeprecationWarning, stacklevel=2) |
21 |
return mykey in self |
22 |
|
23 |
def __contains__(self, mykey): |
24 |
@@ -8461,7 +8461,7 @@ |
25 |
return mysplit[0] + '/' + mysplit[1] |
26 |
|
27 |
warnings.warn("portage.cpv_getkey() called with invalid cpv: '%s'" \ |
28 |
- % (mycpv,), DeprecationWarning) |
29 |
+ % (mycpv,), DeprecationWarning, stacklevel=2) |
30 |
|
31 |
myslash = mycpv.split("/", 1) |
32 |
mysplit = versions._pkgsplit(myslash[-1]) |