Remove future dependency

Stop importing print function from future.

Change-Id: I5c40446e14ccd9a2fe3b673c8bc8581c64012899
This commit is contained in:
Riccardo Pittau 2020-05-04 15:00:53 +02:00
parent a44a77e6d3
commit 74cc4d4da8
2 changed files with 4 additions and 8 deletions

View File

@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import argparse
import contextlib
import gzip

View File

@ -17,13 +17,11 @@
virtual environments.
Since this script is used to bootstrap a virtualenv from the system's Python
environment, it should be kept strictly compatible with Python 2.7.
environment, it should be kept strictly compatible with Python 3.6.
Synced in from openstack-common
"""
from __future__ import print_function
import optparse
import os
import subprocess
@ -47,8 +45,8 @@ class InstallVenv(object):
sys.exit(1)
def check_python_version(self):
if sys.version_info < (2, 7):
self.die("Need Python Version >= 2.7")
if sys.version_info < (3, 6):
self.die("Need Python Version >= 3.6")
def run_command_with_code(self, cmd, redirect_output=True,
check_exit_code=True):
@ -65,7 +63,7 @@ class InstallVenv(object):
output = proc.communicate()[0]
if check_exit_code and proc.returncode != 0:
self.die('Command "%s" failed.\n%s', ' '.join(cmd), output)
return (output, proc.returncode)
return output, proc.returncode
def run_command(self, cmd, redirect_output=True, check_exit_code=True):
return self.run_command_with_code(cmd, redirect_output,