From d7eddebfc373e324b0883bf8b1b26b1fa089f77c Mon Sep 17 00:00:00 2001 From: Jamie Cressey Date: Mon, 27 Jun 2016 14:55:37 +0100 Subject: [PATCH] Actually upload the package contents, doh! --- pypis3/storage.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pypis3/storage.py b/pypis3/storage.py index 875cf08..27b6607 100644 --- a/pypis3/storage.py +++ b/pypis3/storage.py @@ -42,10 +42,11 @@ def put_index(self, package, index): def put_package(self, package): for filename in package.files: - self.s3.put_object( - ACL='private', - Body=os.path.join('dist', filename), - Bucket=self.bucket, - ContentType='application/x-gzip', - Key='{}/{}'.format(package.name, filename) - ) + with open(os.path.join('dist', filename), 'r') as fh: + self.s3.put_object( + ACL='private', + Body=fh.read(), + Bucket=self.bucket, + ContentType='application/x-gzip', + Key='{}/{}'.format(package.name, filename) + )