Browse code

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 <lucasagomes@gmail.com>

Lucas Alvares Gomes authored on 2019/11/27 00:20:03
Showing 1 changed files
... ...
@@ -107,7 +107,7 @@ function remove_disabled_extensions {
107 107
 function image_size_in_gib {
108 108
     local size
109 109
     size=$(openstack image show $1 -c size -f value)
110
-    echo $size | python -c "import math; import six; print(int(math.ceil(float(int(six.moves.input()) / 1024.0 ** 3))))"
110
+    echo $size | python3 -c "import math; print(int(math.ceil(float(int(input()) / 1024.0 ** 3))))"
111 111
 }
112 112
 
113 113
 # configure_tempest() - Set config files, create data dirs, etc