Browse Source

Remove future dependency

Stop importing print function from future.

Change-Id: I5c40446e14ccd9a2fe3b673c8bc8581c64012899
changes/64/725264/2
Riccardo Pittau 11 months ago
parent
commit
74cc4d4da8
2 changed files with 4 additions and 8 deletions
  1. +0
    -2
      ironicclient/common/utils.py
  2. +4
    -6
      tools/install_venv_common.py

+ 0
- 2
ironicclient/common/utils.py 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


+ 4
- 6
tools/install_venv_common.py 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,


Loading…
Cancel
Save