From 40f7579bb8ebd8082dc5f55785c0ae4644b062ec Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Tue, 26 Nov 2019 15:20:03 +0000 Subject: [PATCH] lib/tempest: Do not rely on six for image_size_in_gib input() should work on both python versions for what we need. I understand the concern about eval() on python2 but, in the case it's used we should be fine, plus, python2 is being removed from OpenStack projects. Change-Id: I86a7c31374986f81132bc4f49aee0a76b90e6553 Signed-off-by: Lucas Alvares Gomes --- lib/tempest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tempest b/lib/tempest index 96c9ced14a..7d0a98275f 100644 --- a/lib/tempest +++ b/lib/tempest @@ -107,7 +107,7 @@ function remove_disabled_extensions { function image_size_in_gib { local size size=$(openstack image show $1 -c size -f value) - echo $size | python -c "import math; import six; print(int(math.ceil(float(int(six.moves.input()) / 1024.0 ** 3))))" + echo $size | python3 -c "import math; print(int(math.ceil(float(int(input()) / 1024.0 ** 3))))" } # configure_tempest() - Set config files, create data dirs, etc