Remove unnecessary offset_index variable on .download_file

This commit is contained in:
Lonami Exo 2017-10-09 12:00:14 +02:00
parent 6f1c05633e
commit a7622324dd

View File

@ -688,10 +688,8 @@ class TelegramBareClient:
cdn_decrypter = None cdn_decrypter = None
try: try:
offset_index = 0 offset = 0
while True: while True:
offset = offset_index * part_size
try: try:
if cdn_decrypter: if cdn_decrypter:
result = cdn_decrypter.get_file() result = cdn_decrypter.get_file()
@ -710,7 +708,7 @@ class TelegramBareClient:
client = self._get_exported_client(e.new_dc) client = self._get_exported_client(e.new_dc)
continue continue
offset_index += 1 offset += part_size
# If we have received no data (0 bytes), the file is over # If we have received no data (0 bytes), the file is over
# So there is nothing left to download and write # So there is nothing left to download and write