mirror of
https://git.proxmox.com/git/qemu-server
synced 2026-01-08 18:56:48 +00:00
return error from guest-agent
in case of e.g. a non-existant guest-agent command, it would return
{ error: {someerrorobject} }
but we did only include the 'return' property
in case we do not get any and the error property is set,
return that
i looked at all the paths were we use the QMPClient, and either
we have our own callback for the result,
or we do not rely on the result being empty upon an error, so this
should not break anything
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
5667cc55fe
commit
1928c20188
@ -92,6 +92,7 @@ sub cmd {
|
||||
my $callback = sub {
|
||||
my ($vmid, $resp) = @_;
|
||||
$result = $resp->{'return'};
|
||||
$result = { error => $resp->{'error'} } if !defined($result) && $resp->{'error'};
|
||||
};
|
||||
|
||||
die "no command specified" if !($cmd && $cmd->{execute});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user