From e76973510810a8f4a7f02416996bd73be64c1ba0 Mon Sep 17 00:00:00 2001 From: Ujjwal Raizada Date: Thu, 1 Nov 2018 05:02:56 +0530 Subject: [PATCH] provision: Fix version tuple generation logic. Previous tuple generation logic was throwing an error parsing version like 3.6.7rc1 because micro-versions (like '7rc1') cannot be converted into an integer. Fixes #482. --- tools/provision | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/provision b/tools/provision index fb14dd1..2269e8f 100755 --- a/tools/provision +++ b/tools/provision @@ -36,7 +36,7 @@ the Python version this command is executed with.""" stderr=subprocess.STDOUT, universal_newlines=True) # The output has the format "Python 1.2.3" py_version_list = py_version_output.split()[1].split('.') - py_version = tuple(int(num) for num in py_version_list) + py_version = tuple(int(num) for num in py_version_list[0:2]) venv_name = 'zulip-api-py{}-venv'.format(py_version[0]) if py_version <= (3, 1) and (not options.force):