Reload the source tree only the first time is needed
[bertos.git] / wizard / bertos_utils.py
index ad8277fa2010d98d5d46b5e0be8320e940a52915..e635423f01880c8b7aad2fdda0f8dcedde7b5c25 100644 (file)
@@ -133,11 +133,12 @@ def getToolchainInfo(output):
         info["thread"] = thread[0].split("Thread model: ")[1]
     return info
 
+def loadSourceTree(project):
+    fileList = [f for f in os.walk(project.info("SOURCES_PATH"))]
+    project.setInfo("FILE_LIST", fileList)
+
 def findDefinitions(ftype, project):
     L = project.info("FILE_LIST")
-    if L is None:
-        L = [f for f in os.walk(project.info("SOURCES_PATH"))]
-        project.setInfo("FILE_LIST", L)
     definitions = []
     for element in L:
         for filename in element[2]: