Skip to content

Commit

Permalink
fix for s3put host specification - issue boto#2522
Browse files Browse the repository at this point in the history
  • Loading branch information
srri committed Nov 5, 2014
1 parent bbbf9d2 commit 859f03a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boto/s3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# Copyright (c) 2014, Steven Richards <sbrichards@mit.edu>
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
Expand Down Expand Up @@ -38,6 +39,11 @@ def connect(self, **kw_params):
:rtype: Connection object
:return: The connection to this regions endpoint
"""
for key in kw_params.keys(): #replace self.endpoint if host endpoint param specified
if key == 'host':
self.endpoint = kw_params[key]
del kw_params[key]

if self.connection_cls:
return self.connection_cls(host=self.endpoint, **kw_params)

Expand Down

0 comments on commit 859f03a

Please sign in to comment.