wizard: fix to get the correct BeRTOS version string.
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 24 May 2010 10:40:42 +0000 (10:40 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 24 May 2010 10:40:42 +0000 (10:40 +0000)
The last element of the version string doesn't always represent the
actual BeRTOS version (e.g., when editing a project the last element is
always "[local copy]").

Instead, always use the first element after the "BeRTOS" string to
retrieve the current version.

Fix provided by duplo.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3798 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index c2de0045ba4aab2a31b41390bd04affebd698432..f10d7dc59fafc11de78f98398a20763a83fed4d6 100644 (file)
@@ -297,7 +297,7 @@ def findModuleFiles(module, project_info):
     # TODO: split me in a method/function
     try:
         version_string = bertosVersion(project_info.info("BERTOS_PATH"))
-        version_list = [int(i) for i in version_string.split()[-1].split('.')]
+        version_list = [int(i) for i in version_string.split()[1].split('.')]
     except ValueError:
         # If the version file hasn't a valid version number assume it's an older
         # project.