fix(pvx)compat-with-last-api(2) (#2014)

This commit is contained in:
Simon Bomm 2020-05-26 09:34:58 +02:00 committed by GitHub
parent 3610b4f645
commit 00a5866296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 1 deletions

View File

@ -88,6 +88,11 @@ sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
if (!defined($self->{option_results}->{from}) || $self->{option_results}->{from} eq '') {
$self->{output}->add_option_msg(short_msg => "Need to specify --from option as a PVQL object.");
$self->{output}->option_exit();
}
if (!defined($self->{option_results}->{instance}) || $self->{option_results}->{instance} eq '') {
$self->{output}->add_option_msg(short_msg => "Need to specify --instance option as a PVQL object.");
$self->{output}->option_exit();

View File

@ -97,6 +97,11 @@ sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
if (!defined($self->{option_results}->{from}) || $self->{option_results}->{from} eq '') {
$self->{output}->add_option_msg(short_msg => "Need to specify --from option as a PVQL object.");
$self->{output}->option_exit();
}
if (!defined($self->{option_results}->{instance}) || $self->{option_results}->{instance} eq '') {
$self->{output}->add_option_msg(short_msg => "Need to specify --instance option as a PVQL object.");
$self->{output}->option_exit();

View File

@ -132,6 +132,11 @@ sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
if (!defined($self->{option_results}->{from}) || $self->{option_results}->{from} eq '') {
$self->{output}->add_option_msg(short_msg => "Need to specify --from option as a PVQL object.");
$self->{output}->option_exit();
}
if (!defined($self->{option_results}->{instance}) || $self->{option_results}->{instance} eq '') {
$self->{output}->add_option_msg(short_msg => "Need to specify --instance option as a PVQL object.");
$self->{output}->option_exit();

View File

@ -75,7 +75,7 @@ sub check_options {
$self->{output}->option_exit();
}
if (!defined($self->{option_results}->{from}) || $self->{option_results}->{instance} eq '') {
if (!defined($self->{option_results}->{instance}) || $self->{option_results}->{instance} eq '') {
$self->{output}->add_option_msg(short_msg => "Need to specify --instance option as a PVQL object.");
$self->{output}->option_exit();
}