@@ -519,21 +519,22 @@ def _from_storage(self, ds, indexer, chunks, out_shape, out_dtype,
519519 # Create a shared session object.
520520 if self .interface_type == "s3" and self ._version == 2 :
521521 if self .storage_options is not None :
522- key , secret = None , None
523522 if self .storage_options .get ("anon" , None ) is True :
524523 print ("Reductionist session for Anon S3 bucket." )
525524 session = reductionist .get_session (
526525 None , None , S3_ACTIVE_STORAGE_CACERT )
527- if "key" in self .storage_options :
528- key = self .storage_options ["key" ]
529- if "secret" in self .storage_options :
530- secret = self .storage_options ["secret" ]
531- if key and secret :
532- session = reductionist .get_session (
533- key , secret , S3_ACTIVE_STORAGE_CACERT )
534526 else :
535- session = reductionist .get_session (
536- S3_ACCESS_KEY , S3_SECRET_KEY , S3_ACTIVE_STORAGE_CACERT )
527+ key , secret = None , None
528+ if "key" in self .storage_options :
529+ key = self .storage_options ["key" ]
530+ if "secret" in self .storage_options :
531+ secret = self .storage_options ["secret" ]
532+ if key and secret :
533+ session = reductionist .get_session (
534+ key , secret , S3_ACTIVE_STORAGE_CACERT )
535+ else :
536+ session = reductionist .get_session (
537+ S3_ACCESS_KEY , S3_SECRET_KEY , S3_ACTIVE_STORAGE_CACERT )
537538 else :
538539 session = reductionist .get_session (S3_ACCESS_KEY ,
539540 S3_SECRET_KEY ,
0 commit comments