1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F #688: fix bug in CLI top (#3459)

This commit is contained in:
Alejandro Huertas Herrero 2019-06-27 12:26:36 +02:00 committed by Tino Vázquez
parent f6f85f1d2c
commit ba3af8fb64

View File

@ -367,6 +367,7 @@ module CLIHelper
# @param options [Hash] Object with CLI user options
def top(options = {})
delay = options[:delay] || 1
top = false
begin
loop do
@ -375,9 +376,11 @@ module CLIHelper
CLIHelper.scr_cls
CLIHelper.scr_move(0, 0)
show(data, options, true)
show(data, options, top)
sleep delay
top = true
end
rescue SystemExit, Interrupt, StandardError => e
CLIHelper.fail(e.message)