Skip to content

Commit e86da62

Browse files
authored
fix: use format strings instead of os.path.join for S3 URI in S3Downloader (#1520)
1 parent 88703f5 commit e86da62

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sagemaker/s3.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from __future__ import print_function, absolute_import
1515

1616
import logging
17-
import os
1817

1918
from six.moves.urllib.parse import urlparse
2019
from sagemaker.session import Session
@@ -184,4 +183,4 @@ def list(s3_uri, session=None):
184183
bucket, key_prefix = parse_s3_url(url=s3_uri)
185184

186185
file_keys = sagemaker_session.list_s3_files(bucket=bucket, key_prefix=key_prefix)
187-
return [os.path.join("s3://", bucket, file_key) for file_key in file_keys]
186+
return ["s3://{}/{}".format(bucket, file_key) for file_key in file_keys]

0 commit comments

Comments
 (0)