From 038c0761bd90dafb1b5ec4e0aead4e5256b41033 Mon Sep 17 00:00:00 2001 From: lxnay Date: Fri, 5 Dec 2008 21:33:49 +0000 Subject: [PATCH] Entropy/Equo: - fails on wrong extended parameters (like --as instead of --ask) git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2719 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- client/text_query.py | 3 +++ client/text_repositories.py | 3 +++ client/text_smart.py | 3 +++ client/text_ugc.py | 3 +++ client/text_ui.py | 3 +++ 5 files changed, 15 insertions(+) diff --git a/client/text_query.py b/client/text_query.py index 702f6f792..23eb6e191 100644 --- a/client/text_query.py +++ b/client/text_query.py @@ -42,6 +42,9 @@ def query(options): for opt in options: if (opt == "--deep"): equoRequestDeep = True + elif opt.startswith("--"): + print_error(red(" %s." % (_("Wrong parameters"),) )) + return -10 else: if not opt.startswith("-"): myopts.append(opt) diff --git a/client/text_repositories.py b/client/text_repositories.py index d27ab8112..9835fb821 100644 --- a/client/text_repositories.py +++ b/client/text_repositories.py @@ -42,6 +42,9 @@ def repositories(options): for opt in myopts: if (opt == "--force"): equoRequestForceUpdate = True + elif opt.startswith("--"): + print_error(red(" %s." % (_("Wrong parameters"),) )) + return -10 elif opt in etpRepositoriesOrder: repo_names.append(opt) diff --git a/client/text_smart.py b/client/text_smart.py index 22623a825..995e0c4fa 100644 --- a/client/text_smart.py +++ b/client/text_smart.py @@ -43,6 +43,9 @@ def smart(options): smartRequestEmpty = True elif (opt == "--savedir"): savedir = True + elif opt.startswith("--"): + print_error(red(" %s." % (_("Wrong parameters"),) )) + return else: if savedir: try: diff --git a/client/text_ugc.py b/client/text_ugc.py index 4f87ea68c..f13fe1229 100644 --- a/client/text_ugc.py +++ b/client/text_ugc.py @@ -35,6 +35,9 @@ def ugc(options): for opt in options[1:]: if opt == "--force": do_force = True + elif opt.startswith("--"): + print_error(red(" %s." % (_("Wrong parameters"),) )) + return -10 else: myopts.append(opt) options = myopts diff --git a/client/text_ui.py b/client/text_ui.py index 505bb01e5..6ec8071de 100644 --- a/client/text_ui.py +++ b/client/text_ui.py @@ -76,6 +76,9 @@ def package(options): equoRequestChecksum = False elif (opt == "--skipfirst"): equoRequestSkipfirst = True + elif (opt.startswith("--")): + print_error(red(" %s." % (_("Wrong parameters"),) )) + return -10 else: if opt.startswith("--"): continue