Fix raw_input issue for Python 2/3 compatible code.

Story: 2003429
Task: 24619

Change-Id: I8a93c07886d27a5c0835ac38ccf3e6c8b0f80497
Signed-off-by: chenyan <yan.chen@intel.com>
This commit is contained in:
chenyan 2018-08-30 14:53:24 +08:00
parent 2885d09ed2
commit 2d1e3b7981
2 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@ SPDX-License-Identifier: Apache-2.0
"""
from builtins 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

View File

@ -100,6 +100,7 @@ deps = {[testenv]deps}
requests
requests_toolbelt
rpm
future
basepython = python2.7
commands = pylint {[testenv]cgcs_patch_src_dir} \
{[testenv]patch_alarm_src_dir} \