[pve-devel] [PATCH qemu-server 8/9] cli tools: correctly handle warnings task status
Fabian Ebner
f.ebner at proxmox.com
Wed May 12 14:32:57 CEST 2021
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
Dependency bump for pve-common is needed.
PVE/CLI/qm.pm | 2 +-
PVE/CLI/qmrestore.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index f8972bd..a8ad571 100755
--- a/PVE/CLI/qm.pm
+++ b/PVE/CLI/qm.pm
@@ -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();
diff --git a/PVE/CLI/qmrestore.pm b/PVE/CLI/qmrestore.pm
index 7c09814..034233a 100755
--- a/PVE/CLI/qmrestore.pm
+++ b/PVE/CLI/qmrestore.pm
@@ -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;
--
2.20.1
More information about the pve-devel
mailing list