diff --git a/pym/console/application/cl_client.py b/pym/console/application/cl_client.py index 92fa414..ff29c8c 100644 --- a/pym/console/application/cl_client.py +++ b/pym/console/application/cl_client.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. from calculate.core.server.local_call import Display, Methods, has_force_arg +from calculate.lib.utils.tools import unpack_single_opts from sudsds import WebFault from sudsds.transport import TransportError @@ -270,6 +271,7 @@ def https_server(client, args, unknown_args, url, clVarsCore, wait_thread): elif args.method and args.help: # вычислить наличие флага --force + method_parser = None try: dispatch_usenew = has_force_arg(unknown_args) while True: @@ -286,7 +288,6 @@ def https_server(client, args, unknown_args, url, clVarsCore, wait_thread): _unknown_args) if dispatch_usenew == _args.no_questions: - method_parser.print_help() break else: client.service.clear_method_cache(client.sid, args.method) @@ -295,6 +296,8 @@ def https_server(client, args, unknown_args, url, clVarsCore, wait_thread): wait_thread.stop() sys.stdout.write("\b") sys.stdout.flush() + client.service.clear_method_cache(client.sid, args.method) + method_parser.print_help() else: method_result = call_method(client, args, unknown_args, wait_thread) mr = get_message_receiver(client) @@ -339,7 +342,8 @@ def https_server(client, args, unknown_args, url, clVarsCore, wait_thread): def main(wait_thread): parser = parse() - args, unknown_args = parser.parse_known_args() + args, unknown_args = parser.parse_known_args( + list(unpack_single_opts(sys.argv[1:]))) wait_thread.start() sym_link = os.path.basename(sys.argv[0]) @@ -375,7 +379,8 @@ def main(wait_thread): wait_thread.stop() sys.stdout.write('\r') sys.stdout.flush() - args = parser.parse_args() + args = parser.parse_args( + list(unpack_single_opts(sys.argv[1:]))) logging.basicConfig(level=logging.FATAL) logging.getLogger('sudsds.client').setLevel(logging.FATAL)