This commit is contained in:
SG
2023-05-12 13:43:13 +02:00
parent 260e29fbf6
commit 6db4849939

View File

@@ -168,10 +168,10 @@ async def main():
await send_encrypted_msg(ws, k, (msgtype, peer_group_id, role, "", "", "", "", ""))
bar = None
f = None
i = 1
i = 0
number_of_chunks = None
while True:
if number_of_chunks is not None and i > number_of_chunks + 1:
if number_of_chunks is not None and i > number_of_chunks:
bar.index = 100
bar.suffix = '%(percent).1f%% complete'
bar.update()
@@ -192,8 +192,8 @@ async def main():
f.write(msg["chunk"])
else:
f.write(msg["chunk"])
msgtype = "proceed"
i += 1
msgtype = "proceed"
await send_encrypted_msg(ws, k, (msgtype, peer_group_id, role, "", "", "", "", "")) # request the next chunk from sender
bar.suffix = "%(percent).1f%% complete - %(eta_td)s remaining " + str(i) + "/" + str(number_of_chunks) + " msg sent"
bar.next()