Skip to content

Commit

Permalink
upload_static: Use dictionary comprehension for readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellhansen authored and spladug committed Aug 13, 2012
1 parent c148165 commit ca39abf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/upload_static_files_to_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ def upload(config_file):
bucket = s3.get_bucket(bucket_name)

# build a list of files already in the bucket
remote_files = {}
for key in bucket.list():
remote_files[key.name] = key.etag.strip('"')
remote_files = {key.name : key.etag.strip('"') for key in bucket.list()}

# upload local files not already in the bucket
for root, dirs, files in os.walk(static_root):
Expand Down

0 comments on commit ca39abf

Please sign in to comment.