5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-25 06:03:52 +03:00

cli tools: correctly handle warnings task status

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-05-12 14:32:57 +02:00 committed by Thomas Lamprecht
parent 205dbf39b1
commit 831ad442a2
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ use base qw(PVE::CLIHandler);
my $upid_exit = sub {
my $upid = shift;
my $status = PVE::Tools::upid_read_status($upid);
exit($status eq 'OK' ? 0 : -1);
exit(PVE::Tools::upid_status_is_error($status) ? -1 : 0);
};
my $nodename = PVE::INotify::nodename();

View File

@ -81,7 +81,7 @@ our $cmddef = [ __PACKAGE__, 'qmrestore', ['archive', 'vmid'], undef,
sub {
my $upid = shift;
my $status = PVE::Tools::upid_read_status($upid);
exit($status eq 'OK' ? 0 : -1);
exit(PVE::Tools::upid_status_is_error($status) ? -1 : 0);
}];
1;