[virt-tools-list] [virt-manager PATCH] cli: proper error message for _on_off_convert
Cole Robinson
crobinso at redhat.com
Wed Feb 5 16:51:09 UTC 2014
On 02/05/2014 10:22 AM, Chen Hanxiao wrote:
>
>
> On 02/05/2014 11:15 PM, Cole Robinson wrote:
>> On 02/05/2014 01:14 AM, Chen Hanxiao wrote:
>>> From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
>>>
>>> virt-install man page suggested that we should
>>> use 'on' or 'off' for parameters like:
>>> readonly, removable.
>>> But our error message suggests 'yes' or 'no'.
>>> Although it works, but we should keep pace
>>> with man page.
>>>
>>> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
>>> ---
>>> virtinst/cli.py | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/virtinst/cli.py b/virtinst/cli.py
>>> index 9c8c22c..c061abe 100644
>>> --- a/virtinst/cli.py
>>> +++ b/virtinst/cli.py
>>> @@ -755,7 +755,7 @@ def _on_off_convert(key, val):
>>> val = _yes_no_convert(val)
>>> if val is not None:
>>> return val
>>> - raise fail(_("%(key)s must be 'yes' or 'no'") % {"key": key})
>>> + raise fail(_("%(key)s must be 'on' or 'off'") % {"key": key})
>>>
>>>
>>> class _VirtCLIArgument(object):
>>>
>>
>> Can you do a git grep "=yes" and git grep =no and make sure that the man pages
>> or --help output are consistent here as well? Looks like there are a couple
>> bits to fix.
>>
> Yes, we use both 'yes' and 'on'.
> Do we need to change all of them, from 'yes' to 'on'?
>
> Thanks
>
>>
>
Just the documentation bits, to be consistent. Don't change any test cases.
- Cole
More information about the virt-tools-list
mailing list