Code cleanup and improvements.
This commit is contained in:
@@ -782,13 +782,15 @@ class DepotClient:
|
||||
try:
|
||||
response = self._opener(request, timeout=self.timeout_seconds)
|
||||
except HTTPError as exc:
|
||||
if exc.code == 416 and requested_offset:
|
||||
status = exc.code
|
||||
exc.close()
|
||||
if status == 416 and requested_offset:
|
||||
raise _RetryableDownloadError(
|
||||
f"server rejected the saved offset for {file.path}",
|
||||
discard_partial=True,
|
||||
) from exc
|
||||
raise _RetryableDownloadError(
|
||||
f"HTTP {exc.code} from {server} for {file.path}"
|
||||
f"HTTP {status} from {server} for {file.path}"
|
||||
) from exc
|
||||
except (OSError, HTTPException) as exc:
|
||||
raise _RetryableDownloadError(
|
||||
|
||||
Reference in New Issue
Block a user