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

Do not hardcode the regions #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions athumb/backends/s3boto.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,13 @@
from boto.s3.connection import S3Connection
from boto.exception import S3ResponseError
from boto.s3.key import Key
import boto.ec2
except ImportError:
raise ImproperlyConfigured(
"Could not load boto's S3 bindings. Please install boto."
)

AWS_REGIONS = [
'eu-west-1',
'us-east-1',
'us-west-1',
'us-west-2',
'sa-east-1',
'ap-northeast-1',
'ap-southeast-1',
]
AWS_REGIONS = [r.name for r in boto.ec2.regions()]

REGION_RE = re.compile(r's3-(.+).amazonaws.com')

Expand Down