Skip to content

Commit

Permalink
Don't assume attributes after connect (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindurant authored Dec 4, 2023
1 parent ae6b249 commit cc6663f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions s3fs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ async def set_session(self, refresh=False, kwargs={}):
self.anon = True
else:
# by stashing these, we avoid doing the lookup again
self.key = credentials.access_key
self.secret = credentials.secret_key
self.token = credentials.token
self.key = getattr(credentials, "access_key", None)
self.secret = getattr(credentials, "secret_key", None)
self.token = getattr(credentials, "token", None)

client_kwargs = self.client_kwargs.copy()
init_kwargs = dict(
Expand Down

0 comments on commit cc6663f

Please sign in to comment.