From ba721a4b300525e09a8549d0d8ab0e8cf7a3378e Mon Sep 17 00:00:00 2001 From: alemidev Date: Thu, 25 Aug 2022 19:52:52 +0200 Subject: [PATCH] fix: this was wip, im not ready to migrate yet --- src/treepuncher/addon.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/treepuncher/addon.py b/src/treepuncher/addon.py index 2f90eb7..933a92f 100644 --- a/src/treepuncher/addon.py +++ b/src/treepuncher/addon.py @@ -1,3 +1,4 @@ +from datetime import datetime import json import logging @@ -84,13 +85,16 @@ class Addon: else: # not really necessary since it's a dataclass but whatever opts[field.name] = default self.config = self.Options(**opts) - self.storage = client.storage.addon_storage(self.name) + self.storage = self.init_storage() self.logger = self._client.logger.getChild(self.name) self.register() def register(self): pass + def init_storage(self) -> AddonStorage: + return self.client.storage.addon_storage(self.name) + async def initialize(self): pass