From 4fc34d1240245eb0ac7b41d96d83a550e39a50ff Mon Sep 17 00:00:00 2001 From: Steve Noyes Date: Thu, 14 Jun 2018 14:36:28 -0400 Subject: [PATCH] Fix input import to work with py2 and py3 While running the kolla-cli in the kolla-ansible CI, it failed with this error: Traceback (most recent call last): ... File "/usr/local/lib/python2.7/dist-packages/kolla_cli/commands/host.py", line 23, in from builtins import input ImportError: No module named builtins The fix is to use six in the import Change-Id: Id3a0ab13b659e8b8f4ee0b90c11cd8d5ede3644b --- kolla_cli/commands/host.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kolla_cli/commands/host.py b/kolla_cli/commands/host.py index c3f4d55..670365d 100644 --- a/kolla_cli/commands/host.py +++ b/kolla_cli/commands/host.py @@ -20,7 +20,6 @@ import yaml import kolla_cli.i18n as u -from builtins import input from kolla_cli.api.client import ClientApi from kolla_cli.api.exceptions import ClientException from kolla_cli.commands.exceptions import CommandError @@ -30,6 +29,8 @@ from kolla_cli.common.utils import get_setup_user from cliff.command import Command from cliff.lister import Lister +from six.moves import input + LOG = logging.getLogger(__name__) CLIENT = ClientApi()