Skip to content

Commit

Permalink
fix bugs (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
troychiu authored Oct 20, 2023
1 parent f3f17d2 commit 3300509
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions s3fs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ async def _open_file(range: int):
Bucket=bucket,
Key=key,
**version_id_kw(version_id or vers),
**self.req_kw,
**kw,
)
return resp["Body"], resp.get("ContentLength", None)

Expand Down Expand Up @@ -1248,10 +1248,10 @@ async def _open_file(range: int):
# in a failure.
# Examples:
# Read 1 byte -> failure, retry with read_range=0, byte range should be 0-
# Read 1 byte, success. Read 1 byte: failure. Retry with read_range=2, byte-range should be 2-
# Read 1 bytes, success. Read 1 bytes: success. Read 1 byte, failure. Retry with read_range=3,
# byte-range should be 3-.
body, _ = await _open_file(bytes_read + 1)
# Read 1 byte, success. Read 1 byte: failure. Retry with read_range=1, byte-range should be 1-
# Read 1 bytes, success. Read 1 bytes: success. Read 1 byte, failure. Retry with read_range=2,
# byte-range should be 2-.
body, _ = await _open_file(bytes_read)
continue

if not chunk:
Expand Down

0 comments on commit 3300509

Please sign in to comment.