From 1250b1eee5a4eecfbbdb507dc217215db6140be8 Mon Sep 17 00:00:00 2001 From: omercier <32134301+omercier@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:14:09 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: sdepassio <114986849+sdepassio@users.noreply.github.com> --- src/apps/vmware/vsphere8/custom/api.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/vmware/vsphere8/custom/api.pm b/src/apps/vmware/vsphere8/custom/api.pm index 60e346f915..0b9fb2d240 100644 --- a/src/apps/vmware/vsphere8/custom/api.pm +++ b/src/apps/vmware/vsphere8/custom/api.pm @@ -84,11 +84,11 @@ sub check_options { $self->{output}->add_option_msg(short_msg => "Need to specify --hostname option."); $self->{output}->option_exit(); } - if (!defined($self->{username}) || $self->{username} eq '') { + if ($self->{username} eq '') { $self->{output}->add_option_msg(short_msg => "Need to specify --username option."); $self->{output}->option_exit(); } - if (!defined($self->{password}) || $self->{password} eq '') { + if ($self->{password} eq '') { $self->{output}->add_option_msg(short_msg => "Need to specify --password option."); $self->{output}->option_exit(); }