Replace raw_input with input to make PY3 compatible

The raw_input() raises NameError: name 'raw_input' is not defined in python3.
This patch fixes it by replacing raw_input with input to make PY3 compatible.

Change-Id: I50aad3161893250dab1d60af4569bb65d7edef5a
Closes-Bug: #1595827
This commit is contained in:
yuyafei 2016-06-24 15:37:43 +08:00
parent b7d59bbb1b
commit add4dc3b08

View File

@ -19,6 +19,7 @@ import sys
from oslo_config import cfg
from oslo_log import log
from six import moves
from heat.common import context
from heat.common.i18n import _
@ -103,7 +104,7 @@ def do_reset_stack_status():
"intended to recover from specific crashes."))
print(_("It is advised to shutdown all Heat engines beforehand."))
print(_("Continue ? [y/N]"))
data = raw_input()
data = moves.input()
if not data.lower().startswith('y'):
return
ctxt = context.get_admin_context()