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

Commit

Permalink
Fix a bug always connecting to the default end point in dynamodb2's D…
Browse files Browse the repository at this point in the history
…ynamoDBConnecting
  • Loading branch information
polikeiji authored and toastdriven committed May 21, 2013
1 parent c5ee3f5 commit 1399129
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions boto/dynamodb2/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ def __init__(self, **kwargs):
if not region:
region_name = boto.config.get('DynamoDB', 'region',
self.DefaultRegionName)
region = RegionInfo(self, region_name,
self.DefaultRegionEndpoint)
for reg in boto.dynamodb2.regions():
if reg.name == region_name:
region = reg
break
kwargs['host'] = region.endpoint
AWSQueryConnection.__init__(self, **kwargs)
self.region = region
Expand Down

0 comments on commit 1399129

Please sign in to comment.