From ca39abfa9bf20e96c2f487d0c42e48fd1641dd78 Mon Sep 17 00:00:00 2001 From: maxwellhansen Date: Mon, 13 Aug 2012 10:08:01 -0700 Subject: [PATCH] upload_static: Use dictionary comprehension for readability. --- scripts/upload_static_files_to_s3.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/upload_static_files_to_s3.py b/scripts/upload_static_files_to_s3.py index a61da18ef..7b2cc2a9d 100755 --- a/scripts/upload_static_files_to_s3.py +++ b/scripts/upload_static_files_to_s3.py @@ -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):