Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-client
Commits
3ba714d6
Commit
3ba714d6
authored
Dec 28, 2024
by
Wei Shoulin
Browse files
boto3 inline
parent
f276bd9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dfs_client/common/fs.py
View file @
3ba714d6
...
...
@@ -4,7 +4,6 @@ from io import BytesIO
import
os
import
logging
import
threading
import
boto3
from
typing
import
Generator
,
Any
from
urllib.parse
import
urlparse
from
.config
import
get_storage_config
...
...
@@ -64,6 +63,7 @@ class S3FileStorage(FileStorage):
if
not
self
.
_is_initialized
:
with
self
.
_lock
:
if
not
self
.
_is_initialized
:
import
boto3
self
.
s3_storage
=
s3_storage
parsed_url
=
urlparse
(
s3_storage
)
bucket_name
=
parsed_url
.
netloc
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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