X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos_utils.py;h=d8c5f515ad1069407ddb6fd352d61c5173a00037;hb=8407ef595aa824f91b5804cdcc936326b5774c21;hp=5bf0b4306204ba1db4dbf89e7a2dc2ff8f6f6663;hpb=6fb67bc94e1d53acc1e1b339f22bb7d4f2f7dea3;p=bertos.git diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 5bf0b430..d8c5f515 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -70,7 +70,7 @@ def createBertosProject(project_info): 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": + if "type" in configuration[parameter]["informations"] and configuration[parameter]["informations"]["type"] == "autoenabled": configuration[parameter]["value"] = "1" project_info.setInfo("CONFIGURATIONS", configurations) # Copy all the configuration files @@ -97,10 +97,16 @@ def createBertosProject(project_info): # Files for selected plugins relevants_files = {} for plugin in project_info.info("OUTPUT"): - module = getattr(__import__("plugins", {}, {}, [plugin]), plugin) + module = loadPlugin(plugin) relevants_files[plugin] = module.createProject(project_info) - project_info.setInfo("RELEVANTS_FILES", relevants_files) + project_info.setInfo("RELEVANT_FILES", relevants_files) +def loadPlugin(plugin): + """ + Returns the given plugin module. + """ + return getattr(__import__("plugins", {}, {}, [plugin]), plugin) + def mkGenerator(project_info, makefile): """ Generates the mk file for the current project.