mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
Update requests.py
This commit is contained in:
parent
d2019e0407
commit
4221f28070
@ -26,13 +26,14 @@ class Response(ResponseBase):
|
||||
|
||||
if chunk_size:
|
||||
downloadeddata+=buff[:downloadedSize.value]
|
||||
if len(downloadeddata)>chunk_size:
|
||||
while len(downloadeddata)>chunk_size:
|
||||
yield downloadeddata[:chunk_size]
|
||||
downloadeddata=downloadeddata[chunk_size:]
|
||||
else:
|
||||
yield buff[:downloadedSize.value]
|
||||
if len(downloadeddata):
|
||||
yield downloadeddata
|
||||
while len(downloadeddata):
|
||||
yield downloadeddata[:chunk_size]
|
||||
downloadeddata=downloadeddata[chunk_size:]
|
||||
|
||||
def raise_for_status(self):
|
||||
error=GetLastError()
|
||||
|
Loading…
x
Reference in New Issue
Block a user