From: Zac Medico Date: Sun, 22 Aug 2010 20:16:21 +0000 (-0700) Subject: Fix broken logic in InheritDeprecated. X-Git-Tag: v2.2_rc68~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4260b00663cded4996bdfecf08b068176e8e5d81;p=portage.git Fix broken logic in InheritDeprecated. --- diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 732559958..7a6edd176 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -395,8 +395,10 @@ class InheritDeprecated(LineCheck): return for eclass in direct_inherits: - replacement = self.deprecated_classes[eclass] - if replacement is False: + replacement = self.deprecated_classes.get(eclass) + if replacement is None: + pass + elif replacement is False: self._indirect_deprecated.discard(eclass) self._errors.append("please migrate from " + \ "'%s' (no replacement) on line: %d" % (eclass, num + 1)) @@ -412,10 +414,8 @@ class InheritDeprecated(LineCheck): del self._errors for eclass in self._indirect_deprecated: - replacement = self.deprecated_classes.get(eclass) - if replacement is None: - pass - elif replacement is False: + replacement = self.deprecated_classes[eclass] + if replacement is False: yield "please migrate from indirect " + \ "inherit of '%s' (no replacement)" % (eclass,) else: