From fa38fbb7b3d6f34da6a582ce99566602957c84eb Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Tue, 7 Mar 2017 17:52:42 -0600 Subject: [PATCH] tools: fix package version in arm pack manager Use python's LooseVersion to get the correct version. --- tools/arm_pack_manager/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/arm_pack_manager/__init__.py b/tools/arm_pack_manager/__init__.py index 2f6376e00d..4a1351f665 100644 --- a/tools/arm_pack_manager/__init__.py +++ b/tools/arm_pack_manager/__init__.py @@ -13,6 +13,7 @@ from json import dump, load from zipfile import ZipFile from tempfile import gettempdir import warnings +from distutils.version import LooseVersion warnings.filterwarnings("ignore") @@ -31,7 +32,7 @@ def strip_protocol(url) : def largest_version(content) : return sorted([t['version'] for t in content.package.releases('release')], - reverse=True, key=lambda v: map(int, v.split(".")))[0] + reverse=True, key=lambda v: LooseVersion(v))[0] def do_queue(Class, function, interable) : q = Queue()