mirror of https://gitee.com/openkylin/libvirt.git
Always clear out the last_error in virshReportError.
Otherwise you can get bogus "unknown error" printouts on subsequent commands. Signed-off-by: Chris Lalancette <clalance@redhat.com>
This commit is contained in:
parent
0cdff7b5e7
commit
4487d33f67
|
@ -387,7 +387,7 @@ virshReportError(vshControl *ctl)
|
|||
* no error was ever raised, so just ignore */
|
||||
last_error = virSaveLastError();
|
||||
if (!last_error || last_error->code == VIR_ERR_OK)
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (last_error->code == VIR_ERR_OK) {
|
||||
|
|
Loading…
Reference in New Issue