From 4260b00663cded4996bdfecf08b068176e8e5d81 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 22 Aug 2010 13:16:21 -0700 Subject: [PATCH] Fix broken logic in InheritDeprecated. --- pym/repoman/checks.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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: -- 2.26.2