diff --git a/earthaccess/store.py b/earthaccess/store.py index 610c224c..4905be82 100644 --- a/earthaccess/store.py +++ b/earthaccess/store.py @@ -72,10 +72,11 @@ def make_instance( earthaccess.__auth__ = auth earthaccess.login() + # When sending EarthAccessFiles between processes, it's possible that + # we will need to switch between s3 <--> https protocols. if (earthaccess.__store__.running_in_aws and cls is not s3fs.S3File) or ( not earthaccess.__store__.running_in_aws and cls is s3fs.S3File ): - # On AWS but not using a S3File. Reopen the file in this case for direct S3 access. # NOTE: This uses the first data_link listed in the granule. That's not # guaranteed to be the right one. return EarthAccessFile(earthaccess.open([granule])[0], granule)