Skip to content

Commit 05e23d1

Browse files
BeinseziiCISC
andauthored
Update gguf-py/gguf/utility.py
Co-authored-by: Sigbjørn Skjæret <[email protected]>
1 parent 2c51593 commit 05e23d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gguf-py/gguf/utility.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def get_data_by_range(cls, url: str, start: int, size: int = -1) -> bytes:
231231
response.raise_for_status()
232232

233233
# Get raw byte data
234-
return response.content[:size] if size > -1 else response.content
234+
return response.content[slice(size if size > -1 else None)]
235235

236236
@classmethod
237237
def check_file_exist(cls, url: str) -> bool:

0 commit comments

Comments
 (0)