1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 06:50:22 +03:00

virsh: Let prohibit_newline_at_end_of_diagnostic check pass

The prohibit_newline_at_end_of_diagnostic syntax check is confused when
another unrelated translatable message with a newline is too close to
the function it is supposed to check. Refactoring the code to make the
two strings further apart seems like the easiest solution.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Jiri Denemark 2025-02-20 14:41:32 +01:00
parent ffad5ce459
commit 2844744346
2 changed files with 11 additions and 8 deletions

View File

@ -12307,12 +12307,13 @@ cmdDetachInterface(vshControl *ctl, const vshCmd *cmd)
return ret;
cleanup:
if (!ret) {
vshError(ctl, "%s", _("Failed to detach interface"));
} else {
if (ret) {
vshPrintExtra(ctl, "%s", _("Interface detached successfully\n"));
return true;
}
return ret;
vshError(ctl, "%s", _("Failed to detach interface"));
return false;
}

View File

@ -1758,11 +1758,13 @@ cmdDomainSnapshotRevert(vshControl *ctl, const vshCmd *cmd)
result = virDomainRevertToSnapshot(snapshot, flags);
}
if (result < 0)
if (result < 0) {
vshError(ctl, _("Failed to revert snapshot %1$s"), name);
else
vshPrintExtra(ctl, _("Domain snapshot %1$s reverted\n"), name);
return result >= 0;
return false;
}
vshPrintExtra(ctl, _("Domain snapshot %1$s reverted\n"), name);
return true;
}
/*