From ad284036579fc42d183d99d3dc403d19c3bfabb5 Mon Sep 17 00:00:00 2001 From: duplo Date: Tue, 30 Mar 2010 09:44:23 +0000 Subject: [PATCH] Fix random file inclusion in project editing. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3321 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/bertos_utils.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 5c03074d..8a26aa1b 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -112,12 +112,10 @@ def setEnabledModules(project_info, enabled_modules): files = {} for module, information in modules.items(): information["enabled"] = module in enabled_modules - for dependency in information["depends"]: - if not dependency in modules: - if dependency in files: - files[dependency] += 1 - else: - files[dependency] = 1 + if information["enabled"]: + for dependency in information["depends"]: + if not dependency in modules: + files[dependency] = files.get(dependency, 0) + 1 project_info.setInfo("MODULES", modules) project_info.setInfo("FILES", files) -- 2.25.1