From 43a6e78e46114abbd1bf6d5be249df445f565024 Mon Sep 17 00:00:00 2001 From: zhangyangyang Date: Fri, 31 Aug 2018 09:39:57 +0800 Subject: [PATCH] Python 3 compatibility: convert raw_input to input Story: 2002909 Task: 24566 Change-Id: I5c0f2bc1772cdcd9ceed49d24c0e630b608f8e96 Signed-off-by: zhangyangyang --- tools/engtools/hostdata-collectors/scripts/live_stream.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/engtools/hostdata-collectors/scripts/live_stream.py b/tools/engtools/hostdata-collectors/scripts/live_stream.py index aed8f5520..fa0c461d2 100644 --- a/tools/engtools/hostdata-collectors/scripts/live_stream.py +++ b/tools/engtools/hostdata-collectors/scripts/live_stream.py @@ -19,6 +19,7 @@ import six from multiprocessing import Process, cpu_count from subprocess import Popen, PIPE from collections import OrderedDict +from six.moves import input # generates the required string for the areas where fields are not static @@ -1270,7 +1271,7 @@ def deleteDB(influx_info, grafana_port, grafana_api_key): logging.basicConfig(filename="/tmp/livestream.log", filemode="a", format="%(asctime)s %(levelname)s %(message)s", level=logging.INFO) p = None try: - answer = str(raw_input("\nAre you sure you would like to delete {}? (Y/N): ".format(influx_info[2]))).lower() + answer = str(input("\nAre you sure you would like to delete {}? (Y/N): ".format(influx_info[2]))).lower() except Exception: answer = None if answer is None or answer == "" or answer == "y" or answer == "yes":