script: simplify python version check (#12672)

This commit is contained in:
jnozsc 2020-07-24 13:42:25 -07:00 committed by GitHub
parent 38145b919d
commit 44cbf288ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,8 +50,10 @@ import msgpack
from xml.dom import minidom
if sys.version_info[0] < 3 or sys.version_info[1] < 5:
print("requires Python 3.5+")
MIN_PYTHON_VERSION = (3, 5)
if sys.version_info < MIN_PYTHON_VERSION:
print("requires Python {}.{}+".format(*MIN_PYTHON_VERSION))
sys.exit(1)
DEBUG = ('DEBUG' in os.environ)