Skip to content

Commit 4cfc6c9

Browse files
committed
ENH: Speed up S3DataGrabber using prefix arg
1 parent d9b183b commit 4cfc6c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/interfaces/io.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,10 +866,11 @@ def _list_outputs(self):
866866
raise ValueError(msg)
867867

868868
outputs = {}
869+
869870
# get list of all files in s3 bucket
870871
conn = boto.connect_s3(anon=self.inputs.anon)
871872
bkt = conn.get_bucket(self.inputs.bucket)
872-
bkt_files = list(k.key for k in bkt.list())
873+
bkt_files = list(k.key for k in bkt.list(prefix=self.inputs.bucket_path))
873874

874875
# keys are outfields, args are template args for the outfield
875876
for key, args in list(self.inputs.template_args.items()):

0 commit comments

Comments
 (0)