aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com>2019-10-05 14:22:18 +0200
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2019-10-07 23:39:21 +0200
commitb47590fdb02e1fe74ff832428f2e154cc7d960e7 (patch)
tree669e7097ecc61fb870cdda15378436081e408d34
parent6a5f6ea7e2095da4076df05a8af3d3bc8ac8bb47 (diff)
downloadbuildroot-b47590fdb02e1fe74ff832428f2e154cc7d960e7.tar.gz
buildroot-b47590fdb02e1fe74ff832428f2e154cc7d960e7.tar.bz2
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 <jerzy.m.grzegorek@gmail.com> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Acked-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
-rw-r--r--utils/checkpackagelib/lib_config.py9
1 files 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