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:
parent
f0e257c59b
commit
6443a54d97
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user