Skip to content

Commit 69af9a8

Browse files
dsamaeysoxofaan
andauthored
Update openeo/rest/job.py
Co-authored-by: Stefaan Lippens <[email protected]>
1 parent e64ddff commit 69af9a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openeo/rest/job.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def load_bytes(self) -> bytes:
420420

421421
def _download_to_file(self, url: str, target: Path, chunk_size: int):
422422
head = self.job.connection.head(url, stream=True)
423-
if head.ok and 'Accept-Ranges' in head.headers and 'bytes' in head.headers['Accept-Ranges']:
423+
if head.ok and head.headers.get("Accept-Ranges") == "bytes":
424424
file_size = int(head.headers['Content-Length'])
425425
self._download_chunked(url=url, target=target, file_size=file_size, chunk_size=chunk_size)
426426
else:

0 commit comments

Comments
 (0)