File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 7979class RasterIoAccessor :
8080 def __init__ (self , fs ):
8181 if isinstance (fs , s3fs .S3FileSystem ):
82+ endpoint_url = fs .client_kwargs .get ("endpoint_url" )
83+ endpoint_url = endpoint_url .split ("://" , 2 )[- 1 ] if endpoint_url else None
8284 aws_unsigned = bool (fs .anon )
8385 aws_session = AWSSession (
8486 aws_unsigned = aws_unsigned ,
8587 aws_secret_access_key = fs .secret ,
8688 aws_access_key_id = fs .key ,
8789 aws_session_token = fs .token ,
8890 region_name = fs .client_kwargs .get ("region_name" , "eu-central-1" ),
89- endpoint_url = fs . client_kwargs . get ( " endpoint_url" , None ) ,
91+ endpoint_url = endpoint_url ,
9092 )
9193 self .env = rasterio .env .Env (
9294 session = aws_session ,
9395 aws_no_sign_request = aws_unsigned ,
9496 AWS_VIRTUAL_HOSTING = False ,
9597 )
9698 self .env = self .env .__enter__ ()
99+ return
97100 self .env = rasterio .env .NullContextManager ()
98101
99102 # noinspection PyMethodMayBeStatic
You can’t perform that action at this time.
0 commit comments