From f2e9a63872c5ae3d1af8998e025bc2ac942cbe06 Mon Sep 17 00:00:00 2001 From: "Graham Pugh (iMac Pro)" Date: Tue, 24 Jan 2023 20:24:15 +0100 Subject: [PATCH] use packaging.version.LegacyVersion --- installinstallmacos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installinstallmacos.py b/installinstallmacos.py index 555c7c6..021aaa1 100755 --- a/installinstallmacos.py +++ b/installinstallmacos.py @@ -43,7 +43,7 @@ except ImportError: from xml.dom import minidom from xml.parsers.expat import ExpatError -from pkg_resources import parse_version as Version +from packaging.version import LegacyVersion try: import xattr @@ -704,7 +704,7 @@ def os_installer_product_info( def get_latest_version(current_item, latest_item): """Compares versions between two values and returns the latest (highest) value""" try: - if Version(current_item) > Version(latest_item): + if LegacyVersion(current_item) > LegacyVersion(latest_item): return current_item else: return latest_item