From 7c9719615e09c1d3ee52aedf13cd1de77c30e820 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Thu, 4 Apr 2024 15:51:52 -0700 Subject: [PATCH] Cleanup skill init --- __init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index d20119e..f0cf824 100644 --- a/__init__.py +++ b/__init__.py @@ -78,9 +78,6 @@ def __init__(self, **kwargs): "blue frog energy drink": "blu frog energy drink" } - self.default_intent_timeout = 60 - self.from_caffeine_wiz = list() - self.from_caffeine_informer = list() self._update_event = Event() tdelta = datetime.datetime.now() - self.last_updated if \ @@ -92,6 +89,8 @@ def __init__(self, **kwargs): not self.file_system.exists( 'drinkList_from_caffeine_wiz.txt'))): LOG.info("Updating Caffeine data") + self.from_caffeine_wiz = list() + self.from_caffeine_informer = list() # starting a separate process because this might take some time Thread(target=self._get_new_info, daemon=True).start() else: @@ -339,7 +338,7 @@ def _add_more_caffeine_data(self): invalid_entry = ["beverage", "quantity (oz)", "caffeine content (mg)"] if invalid_entry in self.from_caffeine_wiz: self.from_caffeine_wiz.remove(invalid_entry) - sorted(self.from_caffeine_wiz) + self.from_caffeine_wiz.sort() def _get_new_info(self, reply=False): """fetches and combines new data from the two caffeine sources"""