[virt-tools-list] [virt-manager PATCH] cli: proper error message for _on_off_convert

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Wed Feb 5 06:14:50 UTC 2014


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):
-- 
1.8.2.1




More information about the virt-tools-list mailing list