This commit fixes Issue #6.
Signed-off-by: Radek Pazdera rpazdera@redhat.com --- lnst-ctl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lnst-ctl b/lnst-ctl index 39bb5cf..55e2dd1 100755 --- a/lnst-ctl +++ b/lnst-ctl @@ -58,9 +58,6 @@ def process_recipe(action, file_path, cleanup, res_serializer, return nettestctl.config_only_recipe() elif action == "match_setup": return nettestctl.match_setup() - else: - logging.error("Unknown action "%s"" % action) - usage();
def get_recipe_result(args, file_path, cleanup, res_serializer, packet_capture, log_ctl, pool_checks): @@ -144,11 +141,14 @@ def main(): log_dir=lnst_config.get_option('environment', 'log_dir'), log_subdir=date, colours=coloured_output)
- action = args.pop() + if len(args) <= 0: + logging.error("No action specified") + usage()
+ action = args.pop() if not action in ['run', 'dump', 'config_only', 'match_setup']: - logging.error("No action command passed") - usage(); + logging.error("Action '%s' not recognised" % action) + usage()
summary = []
Applied, thanks
Fri, Aug 30, 2013 at 02:49:38PM CEST, rpazdera@redhat.com wrote:
This commit fixes Issue #6.
Signed-off-by: Radek Pazdera rpazdera@redhat.com
lnst-ctl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lnst-ctl b/lnst-ctl index 39bb5cf..55e2dd1 100755 --- a/lnst-ctl +++ b/lnst-ctl @@ -58,9 +58,6 @@ def process_recipe(action, file_path, cleanup, res_serializer, return nettestctl.config_only_recipe() elif action == "match_setup": return nettestctl.match_setup()
- else:
logging.error("Unknown action \"%s\"" % action)
usage();
def get_recipe_result(args, file_path, cleanup, res_serializer, packet_capture, log_ctl, pool_checks): @@ -144,11 +141,14 @@ def main(): log_dir=lnst_config.get_option('environment', 'log_dir'), log_subdir=date, colours=coloured_output)
- action = args.pop()
if len(args) <= 0:
logging.error("No action specified")
usage()
action = args.pop() if not action in ['run', 'dump', 'config_only', 'match_setup']:
logging.error("No action command passed")
usage();
logging.error("Action '%s' not recognised" % action)
usage()
summary = []
-- 1.8.3.1
LNST-developers mailing list LNST-developers@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/lnst-developers
lnst-developers@lists.fedorahosted.org