From d18125aec1ac18939176e0aef1840436838b4dfa Mon Sep 17 00:00:00 2001 From: yuyafei Date: Mon, 4 Jul 2016 20:13:22 +0800 Subject: [PATCH] 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: I03f38e23794807c572ccde0001b3e24c8a2c3407 Closes-Bug: #1595827 --- aodh/cmd/alarm_conversion.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aodh/cmd/alarm_conversion.py b/aodh/cmd/alarm_conversion.py index e8805e2d4..3fe4917d2 100644 --- a/aodh/cmd/alarm_conversion.py +++ b/aodh/cmd/alarm_conversion.py @@ -15,6 +15,7 @@ """ import datetime +from six import moves import uuid import argparse @@ -88,9 +89,9 @@ def get_parser(): def conversion(): - confirm = raw_input("This tool is used for converting the combination " - "alarms to composite alarms, please type 'yes' to " - "confirm: ") + confirm = moves.input("This tool is used for converting the combination " + "alarms to composite alarms, please type 'yes' to " + "confirm: ") if confirm != 'yes': print("Alarm conversion aborted!") return