[virt-tools-list] [virt-manager PATCH] virt-clone: improve some error prompts
Cole Robinson
crobinso at redhat.com
Tue Dec 9 12:05:09 UTC 2014
On 12/09/2014 01:39 AM, Chen Hanxiao wrote:
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
> virt-clone | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/virt-clone b/virt-clone
> index 4bd5ca3..78f7885 100755
> --- a/virt-clone
> +++ b/virt-clone
> @@ -39,7 +39,8 @@ def get_clone_name(new_name, auto_clone, design):
> logging.debug("Auto-generated clone name '%s'", new_name)
>
> if not new_name:
> - fail(_("A name is required for the new virtual machine."))
> + fail(_("A name is required for the new virtual machine,"
> + " use '-n NAME' to specify one."))
> design.clone_name = new_name
>
>
> @@ -57,7 +58,8 @@ def get_original_guest(guest_name, origfile, design):
> fail(e)
>
> if not guest_name:
> - fail(_("An original machine name or xml file is required."))
> + fail(_("An original machine name or xml file is required.\n"
> + "Try '-o ORIGINAL_GUEST' or '--original-xml=ORIGINAL_XML'."))
> design.original_guest = guest_name
>
>
>
I'd rather not complicate the second error message with --original-xml, since
that should be a very rarely used option.
Also, I'd prefer documenting the long options instead, so --name and
--original. Feel free to just push the updating patch
- Cole
More information about the virt-tools-list
mailing list