Skip to content

Commit 0d75f0c

Browse files
committed
corrected handling of kwargs in s3_open mode
1 parent d7726de commit 0d75f0c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ecco_access/ecco_access.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,15 @@ def shortnames_find(query_list,version,grid,time_res):
238238
for kwarg in list(kwargs.keys()):
239239
if kwarg != 'jsons_root_dir':
240240
del kwargs[kwarg]
241+
elif mode == 's3_open':
242+
for kwarg in list(kwargs.keys()):
243+
if kwarg in ['n_workers','force_redownload','show_noredownload_msg']:
244+
del kwargs[kwarg]
241245
else:
242246
if 'jsons_root_dir' in kwargs.keys():
243247
del kwargs['jsons_root_dir']
244248

249+
245250
# download or otherwise access granules, depending on mode
246251

247252
if mode in ['download_ifspace','s3_get_ifspace']:
@@ -295,7 +300,8 @@ def shortnames_find(query_list,version,grid,time_res):
295300
**kwargs)
296301
elif mode == 's3_open':
297302
granule_files[shortname] = ecco_podaac_s3_open(\
298-
shortname,StartDate,EndDate,version,snapshot_interval)
303+
shortname,StartDate,EndDate,version,snapshot_interval,\
304+
**kwargs)
299305
elif mode == 's3_open_fsspec':
300306
# granule_files will consist of mapper objects rather than URL/path or file lists
301307
granule_files[shortname] = ecco_podaac_s3_open_fsspec(\

0 commit comments

Comments
 (0)