Skip to content

Commit

Permalink
Don't break if we aren't using session tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
jschneier committed Apr 4, 2017
1 parent 7977533 commit 2529729
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions storages/backends/s3boto.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def __init__(self, acl=None, bucket=None, **settings):
self._bucket = None
self._connection = None

self.security_token = None
if not self.access_key and not self.secret_key:
self.access_key, self.secret_key = self._get_access_keys()
self.security_token = self._get_security_token()
Expand Down
1 change: 1 addition & 0 deletions storages/backends/s3boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ def __init__(self, acl=None, bucket=None, **settings):
self._bucket = None
self._connection = None

self.security_token = None
if not self.access_key and not self.secret_key:
self.access_key, self.secret_key = self._get_access_keys()
self.security_token = self._get_security_token()
Expand Down

0 comments on commit 2529729

Please sign in to comment.