Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
0dc13500
Commit
0dc13500
authored
Jul 09, 2012
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S3FS: correct verifying of buckets when IAM policy is applied.
This fixes Issue 120.
parent
2afb6e1f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
fs/s3fs.py
+8
-1
No files found.
fs/s3fs.py
View file @
0dc13500
...
...
@@ -139,7 +139,14 @@ class S3FS(FS):
return
b
except
AttributeError
:
try
:
b
=
self
.
_s3conn
.
get_bucket
(
self
.
_bucket_name
,
validate
=
True
)
# Validate by listing the bucket if there is no prefix.
# If there is a prefix, validate by listing only the prefix
# itself, to avoid errors when an IAM policy has been applied.
if
self
.
_prefix
:
b
=
self
.
_s3conn
.
get_bucket
(
self
.
_bucket_name
,
validate
=
0
)
b
.
get_key
(
self
.
_prefix
)
else
:
b
=
self
.
_s3conn
.
get_bucket
(
self
.
_bucket_name
,
validate
=
1
)
except
S3ResponseError
,
e
:
if
"404 Not Found"
not
in
str
(
e
):
raise
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment