Stop checking for {s3://path}/index.html (#34325)
This commit is contained in:
parent
862029215c
commit
dfab5b5ceb
1 changed files with 0 additions and 14 deletions
|
@ -70,20 +70,6 @@ def s3_open(self, req):
|
|||
url, headers, stream = _s3_open(orig_url)
|
||||
return urllib.response.addinfourl(stream, headers, url)
|
||||
except ClientError as err:
|
||||
# if no such [KEY], but [KEY]/index.html exists,
|
||||
# return that, instead.
|
||||
if err.response["Error"]["Code"] == "NoSuchKey":
|
||||
try:
|
||||
_, headers, stream = _s3_open(url_util.join(orig_url, "index.html"))
|
||||
return urllib.response.addinfourl(stream, headers, orig_url)
|
||||
|
||||
except ClientError as err2:
|
||||
if err.response["Error"]["Code"] == "NoSuchKey":
|
||||
# raise original error
|
||||
raise urllib.error.URLError(err) from err
|
||||
|
||||
raise urllib.error.URLError(err2) from err2
|
||||
|
||||
raise urllib.error.URLError(err) from err
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue