From a3b25b205cfdcee280d69d519044b783ece3cfdc Mon Sep 17 00:00:00 2001 From: championshuttler Date: Wed, 21 Aug 2019 12:45:49 +0000 Subject: [PATCH] Bug 1574948 - Call delete after upload to avoid Contents key error. r=ahal Differential Revision: https://phabricator.services.mozilla.com/D42700 --HG-- extra : moz-landing-system : lando --- tools/docs/moztreedocs/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docs/moztreedocs/upload.py b/tools/docs/moztreedocs/upload.py index e0d8f6038f29..6560ef6dc6b4 100644 --- a/tools/docs/moztreedocs/upload.py +++ b/tools/docs/moztreedocs/upload.py @@ -137,7 +137,6 @@ def s3_upload(files, key_prefix=None): defined, key names will be ``/``. """ s3, bucket = create_aws_session() - s3_delete_missing(files, key_prefix) def upload(f, path, bucket, key, extra_args): # Need to flush to avoid buffering/interleaving from multiple threads. @@ -165,6 +164,7 @@ def s3_upload(files, key_prefix=None): fs.append(e.submit(upload, io.BytesIO(f.read()), path, bucket, key, extra_args)) + s3_delete_missing(files, key_prefix) # Need to do this to catch any exceptions. for f in fs: f.result()