From: duplo Date: Tue, 14 Apr 2009 09:43:28 +0000 (+0000) Subject: Enable autoenabled parameters only for enabled modules X-Git-Tag: 2.1.0~186 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=25eab5ea346cafefaf53c6d82785262c3e408af9;p=bertos.git Enable autoenabled parameters only for enabled modules git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2496 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 5d3edd69..8b6c9072 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -53,13 +53,21 @@ def createBertosProject(project_info): cfgdir = prjdir + "/cfg" shutil.rmtree(cfgdir, True) os.mkdir(cfgdir) + # Set to 1 the autoenabled for enabled modules + for module, information in project_info.info("MODULES").items(): + if information["enabled"] and "configuration" in information and information["configuration"] != "": + configurations = project_info.info("CONFIGURATIONS") + configuration = configurations[information["configuration"]] + for start, parameter in configuration["paramlist"]: + if "type" in configuration[parameter] and configuration[parameter]["type"] == "autoenabled": + configuration[parameter]["value"] = "1" + project_info.setInfo("CONFIGURATIONS", configurations) + # Copy all the configuration files for configuration, information in project_info.info("CONFIGURATIONS").items(): string = open(sources_dir + "/" + configuration, "r").read() for start, parameter in information["paramlist"]: infos = information[parameter] value = infos["value"] - if "type" in infos["informations"] and infos["informations"]["type"] == "autoenabled": - value = "1" if "unsigned" in infos["informations"].keys() and infos["informations"]["unsigned"]: value += "U" if "long" in infos["informations"].keys() and infos["informations"]["long"]: