diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-21 06:46:56 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-21 06:46:56 -0700 |
commit | 9f3302417c6f1f6a06d5ae13d2e5c2df71502f4b (patch) | |
tree | e0594a243973cc71bcc76c8602d233134a5d20d4 | |
parent | e70f8bd3b206cabecf1bd3c64fa841519dba5242 (diff) | |
download | portage-9f3302417c6f1f6a06d5ae13d2e5c2df71502f4b.tar.gz portage-9f3302417c6f1f6a06d5ae13d2e5c2df71502f4b.tar.bz2 portage-9f3302417c6f1f6a06d5ae13d2e5c2df71502f4b.zip |
Add a deprecation warning to FetchlistDict.has_key().
-rw-r--r-- | pym/portage/dbapi/porttree.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index a604260b2..dab75b278 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -1160,6 +1160,9 @@ class FetchlistDict(Mapping): def has_key(self, pkg_key): """Returns true if the given package exists within pkgdir.""" + warnings.warn("portage.dbapi.porttree.FetchlistDict.has_key() is " + "deprecated, use the 'in' operator instead", + DeprecationWarning, stacklevel=2) return pkg_key in self def __iter__(self): |