From: Zac Medico Date: Sat, 21 Aug 2010 13:46:56 +0000 (-0700) Subject: Add a deprecation warning to FetchlistDict.has_key(). X-Git-Tag: v2.2_rc68~37 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9f3302417c6f1f6a06d5ae13d2e5c2df71502f4b;p=portage.git Add a deprecation warning to FetchlistDict.has_key(). --- 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):