raise RuntimeError if not Python 2

This commit is contained in:
tpltnt 2017-04-20 21:42:28 +02:00
parent 7376e563ec
commit c0888de394

View File

@ -27,6 +27,11 @@ def read_version_py(infname):
if mo:
return mo.group(1)
# make sure we have a proper version of python
if 2 != sys.version_info.major:
raise RuntimeError("Python version 2 is required")
# source all the other data
VERSION_PY_FILENAME = 'src/allmydata/_version.py'
version = read_version_py(VERSION_PY_FILENAME)