diff --git a/awscli/customizations/s3/filegenerator.py b/awscli/customizations/s3/filegenerator.py index e98d78c78edb..6d42476bc67e 100644 --- a/awscli/customizations/s3/filegenerator.py +++ b/awscli/customizations/s3/filegenerator.py @@ -203,8 +203,7 @@ def list_files(self, path, dir_op): # means we need to recurse into this sub directory # before yielding the rest of this directory's # contents. - for x in self.list_files(file_path, dir_op): - yield x + yield from self.list_files(file_path, dir_op) else: stats = self._safely_get_file_stats(file_path) if stats: