Skip to content

Commit

Permalink
Remove use of get on file stat dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleknap committed Jun 19, 2017
1 parent da1ad0c commit 234534c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions awscli/customizations/s3/filegenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def call(self, files):

def _inject_extra_information(self, file_stat_kwargs, extra_information):
src_type = file_stat_kwargs['src_type']
file_stat_kwargs['size'] = extra_information.get('Size')
file_stat_kwargs['last_update'] = extra_information.get('LastModified')
file_stat_kwargs['size'] = extra_information['Size']
file_stat_kwargs['last_update'] = extra_information['LastModified']

# S3 objects require the response data retrieved from HeadObject
# and ListObject
Expand Down Expand Up @@ -345,7 +345,7 @@ def _list_single_object(self, s3_path):
# no need to run HeadObject on the S3 object as none of the
# information gained from HeadObject is required to delete the
# object.
return s3_path, {}
return s3_path, {'Size': None, 'LastModified': None}
bucket, key = find_bucket_key(s3_path)
try:
params = {'Bucket': bucket, 'Key': key}
Expand Down

0 comments on commit 234534c

Please sign in to comment.