From 4e88b372744a8ccd29b6a4a44add6870aa0ed6b5 Mon Sep 17 00:00:00 2001 From: Jerzy Grzegorek Date: Tue, 3 Sep 2019 23:13:26 +0200 Subject: [PATCH] utils/checkpackagelib: CommentsMenusPackagesOrder: get value of variable 'level' Get value of variable 'level' only just after the state change. Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: Ricardo Martincoski Signed-off-by: Thomas Petazzoni --- utils/checkpackagelib/lib_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index 8f7b13a866..d12653f080 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -115,8 +115,9 @@ class CommentsMenusPackagesOrder(_CheckFunction): elif text.startswith("endmenu"): self.state = self.state[:-5] - elif source_line: self.level = self.get_level() + + elif source_line: new_package = source_line.group(1) # We order _ before A, so replace it with . -- 2.30.2