On 2013-03-21 09:49, Richard Holland wrote:
From: Ric Holland <richard.holland(a)codethink.co.uk>
Error message now gives short description of each required argument
rather than pointing to non-existent help text.
---
morphlib/plugins/deploy_plugin.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/morphlib/plugins/deploy_plugin.py
b/morphlib/plugins/deploy_plugin.py
index 5bb2d9e..88610ca 100644
--- a/morphlib/plugins/deploy_plugin.py
+++ b/morphlib/plugins/deploy_plugin.py
@@ -51,7 +51,10 @@ class DeployPlugin(cliapp.Plugin):
if len(args) < 3:
raise cliapp.AppException(
- 'Too few arguments to deploy command (see help)')
+ 'Command requires a minimum of three
arguments.\n\tmorph '
+ 'deploy TYPE SYSTEM LOCATION\nTYPE is type of
deployment. '
+ 'SYSTEM is name of the system morphology to deploy.
LOCATION '
+ 'is the destination of the deployed system.')
deployment_type = args[0]
system_name = args[1]
I wonder if it would be better to just tell them to check the
command-line from
`morph --help`, and make that help information more informative.
Currently the
help for deploy just says "Deploy a built system image" without
explaining what
TYPE, SYSTEM and LOCATION are. Either way, LOCATION is currently
under-documented and may require talking to the spirits to get the
correct text.