Skip to content

Commit cc6663f

Browse files
authored
Don't assume attributes after connect (#832)
1 parent ae6b249 commit cc6663f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

s3fs/core.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,9 @@ async def set_session(self, refresh=False, kwargs={}):
504504
self.anon = True
505505
else:
506506
# by stashing these, we avoid doing the lookup again
507-
self.key = credentials.access_key
508-
self.secret = credentials.secret_key
509-
self.token = credentials.token
507+
self.key = getattr(credentials, "access_key", None)
508+
self.secret = getattr(credentials, "secret_key", None)
509+
self.token = getattr(credentials, "token", None)
510510

511511
client_kwargs = self.client_kwargs.copy()
512512
init_kwargs = dict(

0 commit comments

Comments
 (0)