mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-23 05:48:11 -05:00
upload_static: Use dictionary comprehension for readability.
This commit is contained in:
committed by
Neil Williams
parent
c148165845
commit
ca39abfa9b
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user