diff options
author | Thomas O'Dowd <tpodowd@geminimobile.com> | 2012-04-17 13:50:30 +0900 |
---|---|---|
committer | Thomas O'Dowd <tpodowd@geminimobile.com> | 2012-04-17 18:07:39 +0900 |
commit | 3328d99106cfc7b8773985eab086046bfdde20dd (patch) | |
tree | c9b844de8f957ce8a2570e46512886b4416bcd7b /boto/connection.py | |
parent | 0346fc8108d26b9e59d179644779ff8ba352f1e0 (diff) | |
download | boto-3328d99106cfc7b8773985eab086046bfdde20dd.tar.gz |
Allow overriding provider in connection objects
Diffstat (limited to 'boto/connection.py')
-rw-r--r-- | boto/connection.py | 12 |
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: |