From b47590fdb02e1fe74ff832428f2e154cc7d960e7 Mon Sep 17 00:00:00 2001 From: Jerzy Grzegorek Date: Sat, 5 Oct 2019 14:22:18 +0200 Subject: [PATCH] utils/checkpackagelib: CommentsMenusPackagesOrder: initialize in before() This makes sure the state from a previous run (previous file) can never leak over into the next file. Also order the initializations alphabetically. Signed-off-by: Jerzy Grzegorek Cc: Ricardo Martincoski Acked-by: Ricardo Martincoski Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- utils/checkpackagelib/lib_config.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index d1d4a4f549..c5d0dc0fdb 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -61,14 +61,13 @@ class AttributesOrder(_CheckFunction): class CommentsMenusPackagesOrder(_CheckFunction): - menu_of_packages = [""] - package = [""] - print_package_warning = [True] - def before(self): - self.state = "" self.level = 0 + self.menu_of_packages = [""] self.new_package = "" + self.package = [""] + self.print_package_warning = [True] + self.state = "" def get_level(self): return len(self.state.split('-')) - 1 -- 2.30.2