X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos_utils.py;h=4a17beb91eb209ab914dab8e96356b4a395adb11;hb=cb9bbecad29402c1c53b8c87f61a81147f6d9dad;hp=ecc8e1329bb136937f46a9e5eebb492afb7b7a1b;hpb=2c6bd0cab479f9b11cf1dc05ba07110a5db34432;p=bertos.git diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index ecc8e132..4a17beb9 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -52,9 +52,10 @@ def createBertosProject(project_info): cfgdir = prjdir + "/cfg" shutil.rmtree(cfgdir, True) os.mkdir(cfgdir) - for key, value in project_info.info("CONFIGURATIONS").items(): - string = open(sources_dir + "/" + key, "r").read() - for parameter, infos in value.items(): + 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" @@ -63,7 +64,7 @@ def createBertosProject(project_info): if "long" in infos["informations"].keys() and infos["informations"]["long"]: value += "L" string = sub(string, parameter, value) - f = open(cfgdir + "/" + os.path.basename(key), "w") + f = open(cfgdir + "/" + os.path.basename(configuration), "w") f.write(string) f.close() ## Destinatio mk file