Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesls committed Nov 11, 2013
1 parent a92a823 commit 5207986
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions awscli/customizations/s3/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,7 @@ def _verify_bucket_exists(self, bucket_name):
endpoint = service.get_endpoint(self.parameters['region'])
operation = service.get_operation('ListObjects')
# This will raise an exception if the bucket does not exist.
html_response, response_data = operation.call(endpoint,
bucket=bucket_name,
max_keys=0)
operation.call(endpoint, bucket=bucket_name, max_keys=0)

def check_path_type(self, paths):
"""
Expand Down Expand Up @@ -668,10 +666,8 @@ def check_src_path(self, paths):
src_path += '/' # all prefixes must end with a /
bucket, key = find_bucket_key(src_path)
operation = service.get_operation('ListObjects')
html_response, response_data = operation.call(endpoint,
bucket=bucket,
prefix=key,
delimiter='/')
response_data = operation.call(endpoint, bucket=bucket, prefix=key,
delimiter='/')[1]
check_error(response_data)
contents = response_data['Contents']
common_prefixes = response_data['CommonPrefixes']
Expand Down Expand Up @@ -706,8 +702,8 @@ def check_force(self, parsed_globals):
"""
if 'force' in self.parameters:
if self.parameters['force']:
bucket, key = find_bucket_key(self.parameters['src'][5:])
path = 's3://'+bucket
bucket = find_bucket_key(self.parameters['src'][5:])[0]
path = 's3://' + bucket
try:
del_objects = S3SubCommand('rm', self.session, {'nargs': 1})
del_objects([path, '--recursive'], parsed_globals)
Expand Down

0 comments on commit 5207986

Please sign in to comment.