From 44cbf288ec4407c6fddf79b6b39041d5bbee940b Mon Sep 17 00:00:00 2001 From: jnozsc Date: Fri, 24 Jul 2020 13:42:25 -0700 Subject: [PATCH] script: simplify python version check (#12672) --- scripts/gen_vimdoc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py index 328a903b46..a61690e99f 100755 --- a/scripts/gen_vimdoc.py +++ b/scripts/gen_vimdoc.py @@ -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)