From c7a5d21bee924f8f2ff7164b401e979fcc4e5348 Mon Sep 17 00:00:00 2001 From: Rick Waldron <waldron.rick@gmail.com> Date: Fri, 8 Sep 2017 12:28:22 -0400 Subject: [PATCH] Lint: fix CheckHarnessFeatures.comparison_result_lists initial condition checks order --- tools/lint/lib/checks/harnessfeatures.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/lint/lib/checks/harnessfeatures.py b/tools/lint/lib/checks/harnessfeatures.py index 8115b51cd5..acc59fcdb7 100644 --- a/tools/lint/lib/checks/harnessfeatures.py +++ b/tools/lint/lib/checks/harnessfeatures.py @@ -14,12 +14,14 @@ class CheckHarnessFeatures(Check): def comparison_result_lists(self, meta): result = {'features': set(), 'missing': set()} + + if not meta or 'includes' not in meta: + return result + meta_features = meta['features'] if 'features' in meta else [] meta_includes = meta['includes'] features = [] - if not meta or 'includes' not in meta: - return result if len(meta_includes) == 0: return result -- GitLab