mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 11:22:41 +01:00
utils/types: Update version_tuple to allow splitting on "-"
Some Apks use "-" characters to separate their version and identifier so treat as a separator value.
This commit is contained in:
@@ -211,8 +211,10 @@ def regex(value):
|
|||||||
|
|
||||||
def version_tuple(v):
|
def version_tuple(v):
|
||||||
"""
|
"""
|
||||||
Converts a version string into a tuple of strings that can be used for natural comparison.
|
Converts a version string into a tuple of strings that can be used for
|
||||||
|
natural comparison allowing delimeters of "-" and ".".
|
||||||
"""
|
"""
|
||||||
|
v = v.replace('-', '.')
|
||||||
return tuple(map(str, (v.split("."))))
|
return tuple(map(str, (v.split("."))))
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user