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
# 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.