def _read_many_files(self, op, prefixes, **options):
    with NamedTemporaryFile(dir=self._tmpdir, mode='wb', delete=(not debug.s3client), prefix='metaflow.s3.inputs.') as inputfile:
        inputfile.write(b'\n'.join(map(url_quote, prefixes)))
        inputfile.flush()
        (stdout, stderr) = self._s3op_with_retries(op, inputs=inputfile.name, **options)
        if stderr:
            raise MetaflowS3Exception(('Getting S3 files failed.\nFirst prefix requested: %s\nError: %s' % (prefixes[0], stderr)))
        else:
            for line in stdout.splitlines():
                (yield tuple(map(url_unquote, line.strip(b'\n').split(b' '))))
def _read_many_files(self, op, prefixes, **options):
    with NamedTemporaryFile(dir=self._tmpdir, mode='wb', delete=(not debug.s3client), prefix='metaflow.s3.inputs.') as inputfile:
        inputfile.write(b'\n'.join(map(url_quote, prefixes)))
        inputfile.flush()
        (stdout, stderr) = self._s3op_with_retries(op, inputs=inputfile.name, **options)
        if stderr:
            raise MetaflowS3Exception(('Getting S3 files failed.\nFirst prefix requested: %s\nError: %s' % (prefixes[0], stderr)))
        else:
            for line in stdout.splitlines():
                (yield tuple(map(url_unquote, line.strip(b'\n').split(b' '))))