From 9bc77dcb95715fb399bc8ecd244989a2ca582ee1 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 17 Oct 2019 16:17:38 +0200 Subject: [PATCH] TT#69150 Switch to use IO::Prompt::Tiny We use this module which is more lightweight and has less issues. Change-Id: I93f0f2d15ee4cc208254eb6ad6cd6c8454d922fa --- debian/control | 2 +- tools_bin/ngcp-emergency-mode | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index 1960c55363..ae414f2ddc 100644 --- a/debian/control +++ b/debian/control @@ -155,7 +155,7 @@ Section: admin Architecture: all Depends: curl, - libio-prompter-perl, + libio-prompt-tiny-perl, libmoose-perl, libngcp-api-client-perl, libredis-perl, diff --git a/tools_bin/ngcp-emergency-mode b/tools_bin/ngcp-emergency-mode index e719b377c4..fe090fdb12 100755 --- a/tools_bin/ngcp-emergency-mode +++ b/tools_bin/ngcp-emergency-mode @@ -37,7 +37,7 @@ use NGCP::API::Client; use Config::Simple; use TryCatch; use Sys::Syslog qw(:standard :macros); -use IO::Prompter; +use IO::Prompt:Tiny qw(prompt); openlog($PROGRAM_NAME, "ndelay,pid", LOG_LOCAL0); @@ -106,7 +106,7 @@ foreach my $dom(@emergency_domains) { unless ($mode eq "status") { INFO "" . ($mode eq "enable" ? "A" : "Dea") . "ctivating emergency mode for domains " . join(", ", keys %emergency_domain_names); DEBUG "Waiting for user confirmation..."; - $res = prompt(-in => *STDIN, -prompt => 'Please confirm (yes/no): '); + $res = prompt('Please confirm (yes/no):'); DEBUG "User entered '$res'"; if($res ne "yes") { INFO "Aborting emergency mode $mode by user request!";