mirror of
https://github.com/Nick80835/microbot
synced 2025-08-22 10:09:40 +00:00
remove the last while True
This commit is contained in:
parent
f0e257c59b
commit
6443a54d97
@ -33,12 +33,7 @@ TypeLocation = Union[Document, InputDocumentFileLocation, InputPeerPhotoFileLoca
|
|||||||
|
|
||||||
|
|
||||||
def stream_file(file_to_stream: BinaryIO, chunk_size=1024):
|
def stream_file(file_to_stream: BinaryIO, chunk_size=1024):
|
||||||
while True:
|
while data_read := file_to_stream.read(chunk_size):
|
||||||
data_read = file_to_stream.read(chunk_size)
|
|
||||||
|
|
||||||
if not data_read:
|
|
||||||
break
|
|
||||||
|
|
||||||
yield data_read
|
yield data_read
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user