Fix bug in python version check in raspi-blinka.py

The file checked the python version by comparing the major and minor versions. However, the variables compared were strings, making '11' > '8' -> False, when in fact it should have been true.
I converted the versions to integers before comparing, so that versions 10 and above are accepted
This commit is contained in:
Paul Methfessel 2023-10-13 21:51:29 +02:00 committed by GitHub
parent 4d091776d4
commit 26404d7674
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ def check_blinka_python_version():
current_major, current_minor = current.split(".")[0:2]
required_major, required_minor = str(blinka_minimum_python_version).split(".")[0:2]
if current_major >= required_major and current_minor >= required_minor:
if int(current_major) >= int(required_major) and int(current_minor) >= int(required_minor):
return
shell.bail("Blinka requires a minimum of Python version {} to install, current one is {}. Please update your OS!".format(blinka_minimum_python_version, current))