Fix bug 3371309: lsslp <noderange> command is providing a usage error
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10216 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
58139178e8
commit
c1dfa15b3b
@ -255,9 +255,9 @@ sub parse_args {
|
||||
####################################
|
||||
# Check for an extra argument
|
||||
####################################
|
||||
if ( defined( $ARGV[0] )) {
|
||||
return(usage( "Invalid Argument: $ARGV[0]" ));
|
||||
}
|
||||
#if ( defined( $ARGV[0] )) {
|
||||
# return(usage( "Invalid Argument: $ARGV[0]" ));
|
||||
#}
|
||||
|
||||
|
||||
#############################################
|
||||
@ -274,6 +274,9 @@ sub parse_args {
|
||||
foreach (@nodes) {
|
||||
push @filternodes, $_;
|
||||
}
|
||||
unless (@filternodes) {
|
||||
return(usage( "Invalid Argument: $ARGV[0]" ));
|
||||
}
|
||||
} elsif ( scalar(@ARGV) > 1 ) {
|
||||
return(usage( "Invalid flag, please check and retry." ));
|
||||
}
|
||||
@ -1172,13 +1175,6 @@ sub format_output {
|
||||
###########################################
|
||||
my $outhash = parse_responses( $request, $values, \$length );
|
||||
|
||||
###########################################
|
||||
# No responses
|
||||
###########################################
|
||||
if (( keys %$outhash ) == 0 ){
|
||||
send_msg( $request, 0, "No responses" );
|
||||
return;
|
||||
}
|
||||
|
||||
###########################################
|
||||
# filter the result and keep the specified nodes
|
||||
@ -1197,6 +1193,15 @@ sub format_output {
|
||||
$outhash = $outhash1;
|
||||
}
|
||||
|
||||
###########################################
|
||||
# No responses
|
||||
###########################################
|
||||
if (( keys %$outhash ) == 0 ){
|
||||
send_msg( $request, 0, "No responses" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
###########################################
|
||||
# -w flag for write to xCat database
|
||||
###########################################
|
||||
|
Loading…
Reference in New Issue
Block a user