Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Added config-based region support to DynamoDBv2.
Browse files Browse the repository at this point in the history
  • Loading branch information
toastdriven committed May 13, 2013
1 parent 28a7b22 commit 140b659
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion boto/dynamodb2/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def __init__(self, **kwargs):
region = kwargs.pop('region', None)
validate_checksums = kwargs.pop('validate_checksums', True)
if not region:
region = RegionInfo(self, self.DefaultRegionName,
region_name = boto.config.get('DynamoDB', 'region',
self.DefaultRegionName)
region = RegionInfo(self, region_name,
self.DefaultRegionEndpoint)
kwargs['host'] = region.endpoint
AWSQueryConnection.__init__(self, **kwargs)
Expand Down

0 comments on commit 140b659

Please sign in to comment.