maintainers/scripts/update-python-libraries: compare versions semantically instead of lexicographically (#43120)

This commit is contained in:
Robert Schütz 2018-07-06 19:32:40 +02:00 committed by xeji
parent 06c6ff2465
commit 7a59be9c52

View file

@ -262,7 +262,7 @@ def _update_package(path, target):
if new_version == version:
logging.info("Path {}: no update available for {}.".format(path, pname))
return False
elif new_version <= version:
elif Version(new_version) <= Version(version):
raise ValueError("downgrade for {}.".format(pname))
if not new_sha256:
raise ValueError("no file available for {}.".format(pname))