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 <module>
    from builtins import input
ImportError: No module named builtins

The fix is to use six in the import

Change-Id: Id3a0ab13b659e8b8f4ee0b90c11cd8d5ede3644b
This commit is contained in:
Steve Noyes 2018-06-14 14:36:28 -04:00
parent fd286f6b5d
commit 4fc34d1240
1 changed files with 2 additions and 1 deletions

View File

@ -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()