From ac85099022421b44b33e1c25e78ee5555e7118b8 Mon Sep 17 00:00:00 2001 From: HappyZ Date: Sat, 9 Feb 2019 20:40:58 -0600 Subject: [PATCH] tell the number of chunks to transfer beforehand --- python_api/libInteractive.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python_api/libInteractive.py b/python_api/libInteractive.py index 5b42fec..d78bea4 100644 --- a/python_api/libInteractive.py +++ b/python_api/libInteractive.py @@ -305,6 +305,8 @@ def diagnosis_push_file( symbol = '>' startTime = int(time.time() * 1000) totalChunks = 0 + dpt.info_print("total chunks to transfer: {:.2f}" + .format(os.path.getsize(localfp) / chunkSize)) with open(localfp, 'rb') as f: while 1: chunk = f.read(chunkSize)