summaryrefslogtreecommitdiff
path: root/boto/connection.py
diff options
context:
space:
mode:
authorThomas O'Dowd <tpodowd@geminimobile.com>2012-04-17 13:50:30 +0900
committerThomas O'Dowd <tpodowd@geminimobile.com>2012-04-17 18:07:39 +0900
commit3328d99106cfc7b8773985eab086046bfdde20dd (patch)
treec9b844de8f957ce8a2570e46512886b4416bcd7b /boto/connection.py
parent0346fc8108d26b9e59d179644779ff8ba352f1e0 (diff)
downloadboto-3328d99106cfc7b8773985eab086046bfdde20dd.tar.gz
Allow overriding provider in connection objects
Diffstat (limited to 'boto/connection.py')
-rw-r--r--boto/connection.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/boto/connection.py b/boto/connection.py
index e170d0b3..11382bb5 100644
--- a/boto/connection.py
+++ b/boto/connection.py
@@ -470,10 +470,14 @@ class AWSAuthConnection(object):
timeout = config.getint('Boto', 'http_socket_timeout')
self.http_connection_kwargs['timeout'] = timeout
- self.provider = Provider(provider,
- aws_access_key_id,
- aws_secret_access_key,
- security_token)
+ if isinstance(provider, Provider):
+ # Allow overriding Provider
+ self.provider = provider
+ else:
+ self.provider = Provider(provider,
+ aws_access_key_id,
+ aws_secret_access_key,
+ security_token)
# allow config file to override default host
if self.provider.host: