mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-14 06:38:36 +00: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:
parent
219c7f11a1
commit
987c3f0c82
@ -211,8 +211,10 @@ def regex(value):
|
||||
|
||||
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("."))))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user