From 7d69c35c70769663abc874e3fb1c57bfcd57d13d Mon Sep 17 00:00:00 2001 From: Colin Gagnaire Date: Tue, 27 Nov 2018 09:39:39 +0100 Subject: [PATCH] enh oracle tablespace mode no result found (#1243) --- database/oracle/mode/tablespaceusage.pm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/database/oracle/mode/tablespaceusage.pm b/database/oracle/mode/tablespaceusage.pm index fe541970d..bd3779d4d 100644 --- a/database/oracle/mode/tablespaceusage.pm +++ b/database/oracle/mode/tablespaceusage.pm @@ -394,13 +394,19 @@ sub manage_selection { $used = $size - $free; } - $self->{tablespace}->{$name} = { used => $used, - free => $free, - total => $size, - prct_used => $percent_used, - display => lc $name }; + $self->{tablespace}->{$name} = { + used => $used, + free => $free, + total => $size, + prct_used => $percent_used, + display => lc($name) + }; } + if (scalar(keys %{$self->{tablespace}}) <= 0) { + $self->{output}->add_option_msg(short_msg => "No tablespaces found."); + $self->{output}->option_exit(); + } } 1;