From 75a4aa77f7173bc4f752c3ab367c0322f0103543 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: Mon, 22 Oct 2012 23:40:35 +0400 Subject: [PATCH] Fix progress bar and exitCode --- console/application/cl_client.py | 6 ++++-- console/application/function.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/console/application/cl_client.py b/console/application/cl_client.py index 67c28ab..ec36338 100644 --- a/console/application/cl_client.py +++ b/console/application/cl_client.py @@ -246,6 +246,7 @@ def https_server(client, args, unknown_args, url, clVarsCore, wait_thread): from pid_information import client_pid_kill return client_pid_kill(client, args.pid_kill) + retCode = 0 if not args.method: wait_thread.stop() client_list_methods(client) @@ -299,11 +300,12 @@ def https_server(client, args, unknown_args, url, clVarsCore, wait_thread): pid = int(mess.message) except: return 1 - + retCode = \ + 1 if int(client.service.pid_info(client.sid,pid)[0][1]) else 0 client.service.clear_pid_cache(client.sid, pid) client.service.clear_method_cache(client.sid, args.method) wait_thread.stop() - return 0 + return retCode def main(wait_thread): parser = parse() diff --git a/console/application/function.py b/console/application/function.py index 178a926..90820ed 100644 --- a/console/application/function.py +++ b/console/application/function.py @@ -479,7 +479,7 @@ def get_Progress(client, sid, pid, id): percent = returnProgr.percent if percent < 0: # print_progress(returnProgr, error = True) - pbar.update(0 - returnProgr.percent) + pbar.update(0)# - returnProgr.percent) pbar.finish() else: # print_progress(returnProgr)