From 7014821b41ef836643aaac7728cc303375738ee2 Mon Sep 17 00:00:00 2001 From: kyleknap Date: Tue, 27 Oct 2015 17:58:06 -0700 Subject: [PATCH] Further clean up the FileGenerator --- awscli/customizations/s3/filegenerator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/awscli/customizations/s3/filegenerator.py b/awscli/customizations/s3/filegenerator.py index f7cbb887fea8..026db117f74f 100644 --- a/awscli/customizations/s3/filegenerator.py +++ b/awscli/customizations/s3/filegenerator.py @@ -137,6 +137,9 @@ def call(self, files): dest_type = files['dest']['type'] file_iterator = function_table[src_type](source, files['dir_op']) for file_data in file_iterator: + # The file data is a tuple where the first element is the + # path for that file and the rest of the elements in the tuple + # are extra information relevent to creating the FileStat object. src_path = file_data[0] extra_information = file_data[1:] dest_path, compare_key = find_dest_path_comp_key(files, src_path) @@ -179,7 +182,7 @@ def list_files(self, path, dir_op): if not self.should_ignore_file(path): if not dir_op: size, last_update = get_file_stat(path) - yield path, size, last_update, None + yield path, size, last_update else: # We need to list files in byte order based on the full # expanded path of the key: 'test/1/2/3.txt' However, @@ -213,7 +216,7 @@ def list_files(self, path, dir_op): yield x else: size, last_update = get_file_stat(file_path) - yield file_path, size, last_update, None + yield file_path, size, last_update def normalize_sort(self, names, os_sep, character): """