From 39a294ddbe468bcc6fd2cab0c1b5ee5efd553421 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 14 Jan 2020 13:07:31 +0000 Subject: [PATCH] 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. --- wa/utils/types.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wa/utils/types.py b/wa/utils/types.py index 668e5c7c..81fecaf6 100644 --- a/wa/utils/types.py +++ b/wa/utils/types.py @@ -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("."))))