Skip to content

Commit

Permalink
Actually upload the package contents, doh!
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Cressey committed Jun 27, 2016
1 parent 4bf9dce commit d7eddeb
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pypis3/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)

0 comments on commit d7eddeb

Please sign in to comment.