Skip to content

Commit e411332

Browse files
Merge pull request #9 from mergado/fix_in_memory_storage
Fix token handling if in memory storege is used
2 parents 2c2ffb0 + fc6f7fc commit e411332

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mergadoapiclient/storage.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ def load(self):
2828
"""Loads storage instance. Default implementation stores the
2929
token in memory and does nothing else.
3030
"""
31+
if not hasattr(self, 'token'):
32+
return
33+
3134
if self.token and self.token_is_valid:
3235
return self

0 commit comments

Comments
 (0)