Fix raw_input issue for Python 2/3 compatible code.

use six.moves instead of builtins (from future).

Story: 2003429
Task: 24619

Change-Id: I05823db8b8c4c38ad99b608247d1f13dded350ea
Signed-off-by: chenyan <yan.chen@intel.com>
Signed-off-by: Sun Austin <austin.sun@intel.com>
This commit is contained in:
chenyan 2018-09-02 20:29:28 +08:00 committed by Sun Austin
parent 8f1301e7fd
commit 29b0f7a9cc
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ SPDX-License-Identifier: Apache-2.0
"""
from __future__ import print_function
from six.moves import input
import requests
import json
import os
@ -600,7 +601,7 @@ def patch_commit_req(debug, args):
print(textwrap.fill(commit_warning, width=TERM_WIDTH, subsequent_indent=' ' * 9))
print()
user_input = raw_input("Would you like to continue? [y/N]: ")
user_input = input("Would you like to continue? [y/N]: ")
if user_input.lower() != 'y':
print("Aborting...")
return 1