fixes
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user