mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +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
164095e664
commit
39a294ddbe
@ -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