Skip to content

Commit

Permalink
Stop upload exploding on unknown keys
Browse files Browse the repository at this point in the history
(also remove the debugging left in)
  • Loading branch information
norm committed Jun 15, 2021
1 parent cf042d9 commit b9ed170
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions documentation/release-notes.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# Release notes for Flourish

## 0.10.2 - 15 Jun 2021

* Fix a bug in the redirects uploader that stopped upload working
when there was a new file or redirect to upload


## 0.10.1 - 15 Jun 2021

#### New
Expand Down
9 changes: 6 additions & 3 deletions flourish/command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,18 @@ def upload(args):
redirects = flourish.redirects
for redirect in redirects:
_s3path = redirect[1:]
if _objects[_s3path].e_tag != REDIRECT_ETAG:
if (
_s3path not in _objects
or _objects[_s3path].e_tag != REDIRECT_ETAG
):
print('->', redirect, 'to', redirects[redirect])
if not args.dry_run:
print(_bucket.put_object(
_bucket.put_object(
Key=_s3path,
Body='',
ContentType='text/html',
WebsiteRedirectLocation=redirects[redirect],
))
)
_invalidations.append(redirect)

for _path in _files:
Expand Down
2 changes: 1 addition & 1 deletion flourish/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.10.1'
__version__ = '0.10.2'

0 comments on commit b9ed170

Please sign in to comment.