From: arighi Date: Mon, 24 May 2010 10:40:42 +0000 (+0000) Subject: wizard: fix to get the correct BeRTOS version string. X-Git-Tag: 2.5.0~119 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=60f0e0829b5fe5084054cec0fb122da9191cba5b;p=bertos.git wizard: fix to get the correct BeRTOS version string. 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 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index c2de0045..f10d7dc5 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -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.