2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-22 01:58:17 +00:00

remove the last while True

This commit is contained in:
Nick80835 2023-10-22 18:58:23 -04:00
parent f0e257c59b
commit 6443a54d97

View File

@ -33,12 +33,7 @@ TypeLocation = Union[Document, InputDocumentFileLocation, InputPeerPhotoFileLoca
def stream_file(file_to_stream: BinaryIO, chunk_size=1024):
while True:
data_read = file_to_stream.read(chunk_size)
if not data_read:
break
while data_read := file_to_stream.read(chunk_size):
yield data_read