From: duplo Date: Tue, 30 Mar 2010 09:44:23 +0000 (+0000) Subject: Fix random file inclusion in project editing. X-Git-Tag: 2.5.0~587 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ad284036579fc42d183d99d3dc403d19c3bfabb5;p=bertos.git Fix random file inclusion in project editing. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3321 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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)