From ca2812a1e765eaee493600e0204db3bbc6693e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Fri, 22 Feb 2013 14:14:34 +0400 Subject: [PATCH] Fix wrong argparse --- console/application/methods_func.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/console/application/methods_func.py b/console/application/methods_func.py index 89e6ce7..3f19efb 100644 --- a/console/application/methods_func.py +++ b/console/application/methods_func.py @@ -87,9 +87,6 @@ def parse(): parser.add_argument( '--no-progress', action='store_true', default=False, dest = 'no_progress', help=_('do not display the progress bar')) - parser.add_argument( - '-f', '--force', action='store_true', default=False, - dest = 'no_questions', help=_('silent during the process')) parser.add_argument( '-P', action='store_true', default=False, dest = 'stdin_passwd', @@ -106,7 +103,6 @@ def get_view(client, method, sid, view_params): def call_method(client, args, unknown_args, wait_thread): method = args.method - no_questions = args.no_questions stdin_passwd = args.stdin_passwd view_params = get_view_params(client, method + '_view', step = None, \ expert = True) @@ -115,7 +111,9 @@ def call_method(client, args, unknown_args, wait_thread): method_parser = get_method_argparser(view, args) param_object = _create_obj(client, method) try: + unknown_args = method_parser.fixBoolVariables(unknown_args) args, unknown_args = method_parser.parse_known_args(unknown_args) + no_questions = args.no_questions except SystemExit: raise Exception(1) for i in unknown_args: