summaryrefslogtreecommitdiffstats
path: root/pym/portage/__init__.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-01 12:55:49 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-01 12:55:49 +0000
commit211b56614083fbb4f78b74f28a3962f97bf684d5 (patch)
tree9358a35593b08d5b140dcf9d5569b7ce7c7cab51 /pym/portage/__init__.py
parent56aea2672000174743514bcc7f58f41733f64ce4 (diff)
downloadportage-211b56614083fbb4f78b74f28a3962f97bf684d5.tar.gz
portage-211b56614083fbb4f78b74f28a3962f97bf684d5.tar.bz2
portage-211b56614083fbb4f78b74f28a3962f97bf684d5.zip
Py3k compatibility patch #6 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators. svn path=/main/trunk/; revision=10875
Diffstat (limited to 'pym/portage/__init__.py')
-rw-r--r--pym/portage/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index d5b82ec13..06193e717 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -30,6 +30,7 @@ try:
import UserDict
from itertools import chain, izip
import platform
+ import warnings
except ImportError, e:
sys.stderr.write("\n\n")
sys.stderr.write("!!! Failed to complete python imports. These are internal modules for\n")
@@ -2759,6 +2760,9 @@ class config(object):
return v
def has_key(self,mykey):
+ warnings.warn("portage.config.has_key() is deprecated, "
+ "use the in operator instead",
+ DeprecationWarning)
return mykey in self
def __contains__(self, mykey):