Dan Kenigsberg has submitted this change and it was merged.
Change subject: tool: Fix error message for non-existing module
......................................................................
tool: Fix error message for non-existing module
When user specify non existing module (e.g. foo)using the --module
option, he would get this confusing error:
UsageError: error: argument --module: invalid choice: foo (choose from
['foo'])
While the availabe modules are certificates, libvirt, and sanlock.
Now the error display the available modules, sorted, and formatted in a
user friendly way, instead of as Python list:
UsageError: error: argument --module: invalid choice: foo
(available: certificates, libvirt, sanlock)
The relevant test use now real names, so errors look like real errors,
which help to format them properly.
Change-Id: Ib794b4cb0dcedbbd5b5bb4bb4396860e5edd8710
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/31742
Reviewed-by: mooli tayer <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M lib/vdsm/tool/configurator.py
M tests/toolTests.py
2 files changed, 6 insertions(+), 4 deletions(-)
Approvals:
Nir Soffer: Verified
mooli tayer: Looks good to me, but someone else must approve
Dan Kenigsberg: Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/31742
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib794b4cb0dcedbbd5b5bb4bb4396860e5edd8710
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches