Correct typo
[bertos.git] / wizard / bertos_utils.py
index 5d08f54db01d1ebbadf9cf9d0cbd160572a5d7c8..b7898630dae2be6cee032dd6c5e12d4d9520d070 100644 (file)
@@ -95,10 +95,18 @@ def createBertosProject(project_info):
     main = open("srctemplates/main.c", "r").read()
     open(prjdir + "/main.c", "w").write(main)
     # Files for selected plugins
+    relevants_files = {}
     for plugin in project_info.info("OUTPUT"):
-        module = getattr(__import__("plugins", {}, {}, [plugin]), plugin)
-        module.createProject(project_info)
+        module = loadPlugin(plugin)
+        relevants_files[plugin] = module.createProject(project_info)
+    project_info.setInfo("RELEVANTS_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.