Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/bad s3 file key #29

Merged
merged 6 commits into from Feb 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion oz/aws_cdn/__init__.py
Expand Up @@ -53,7 +53,10 @@ def get_file(path):
"""Gets a file"""
if oz.settings["s3_bucket"]:
bucket = get_bucket(oz.settings["s3_bucket"])
return S3File(bucket.get_key(path))
key = bucket.get_key(path)
if not key:
key = bucket.new_key(path)
return S3File(key)
else:
return LocalFile(oz.settings["static_path"], path)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
@@ -1,6 +1,6 @@
from setuptools import setup

VERSION = "0.8.3"
VERSION = "0.8.4"

setup(
name="Oz",
Expand Down