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
77709826
Commit
77709826
authored
Oct 15, 2010
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S3FS: check for AWS_* environ variables and fail early if missing.
This closes issue #41.
parent
6c6e44a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
fs/s3fs.py
+7
-0
No files found.
fs/s3fs.py
View file @
77709826
...
@@ -9,6 +9,7 @@ interface for objects stored in Amazon Simple Storage Service (S3).
...
@@ -9,6 +9,7 @@ interface for objects stored in Amazon Simple Storage Service (S3).
"""
"""
import
os
import
time
import
time
import
datetime
import
datetime
import
tempfile
import
tempfile
...
@@ -88,6 +89,12 @@ class S3FS(FS):
...
@@ -88,6 +89,12 @@ class S3FS(FS):
prefix
=
prefix
[
1
:]
prefix
=
prefix
[
1
:]
if
not
prefix
.
endswith
(
separator
)
and
prefix
!=
""
:
if
not
prefix
.
endswith
(
separator
)
and
prefix
!=
""
:
prefix
=
prefix
+
separator
prefix
=
prefix
+
separator
if
aws_access_key
is
None
:
if
"AWS_ACCESS_KEY_ID"
not
in
os
.
environ
:
raise
CreateFailedError
(
"AWS_ACCESS_KEY_ID not set"
)
if
aws_secret_key
is
None
:
if
"AWS_SECRET_ACCESS_KEY"
not
in
os
.
environ
:
raise
CreateFailedError
(
"AWS_SECRET_ACCESS_KEY not set"
)
self
.
_prefix
=
prefix
self
.
_prefix
=
prefix
self
.
_tlocal
=
thread_local
()
self
.
_tlocal
=
thread_local
()
super
(
S3FS
,
self
)
.
__init__
(
thread_synchronize
=
thread_synchronize
)
super
(
S3FS
,
self
)
.
__init__
(
thread_synchronize
=
thread_synchronize
)
...
...
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