do not init storage before first used
This commit is contained in:
parent
d9c0b18404
commit
d958b9dfad
1 changed files with 3 additions and 1 deletions
|
@ -47,11 +47,13 @@ class Storage:
|
|||
**kwargs: Dict[str, str]) -> None:
|
||||
self.storage_type = None
|
||||
self.mod = None
|
||||
if kwargs:
|
||||
self.setting(**kwargs)
|
||||
|
||||
def get(self):
|
||||
if self.storage_type is None:
|
||||
self.storage_type = environ.get('TIRAMISU_STORAGE', DEFAULT_STORAGE)
|
||||
self.setting()
|
||||
if self.mod is None:
|
||||
modulepath = '{0}.storage.{1}'.format(MODULE_PATH,
|
||||
self.storage_type)
|
||||
|
|
Loading…
Reference in a new issue