Skip to content

Commit

Permalink
Further clean up the FileGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleknap committed Oct 28, 2015
1 parent dfd269c commit 7014821
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions awscli/customizations/s3/filegenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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):
"""
Expand Down

0 comments on commit 7014821

Please sign in to comment.