From c1ee520e291dc7c307c4bef7cc331e4ca8fbc1d3 Mon Sep 17 00:00:00 2001 From: thevickypedia Date: Sat, 3 Feb 2024 00:05:55 -0600 Subject: [PATCH] Release `v4.4.2` --- jarvis/__init__.py | 2 +- jarvis/executors/lights.py | 16 ++++++++-------- release_notes.rst | 8 ++++++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/jarvis/__init__.py b/jarvis/__init__.py index 663fa3f7..6784bbed 100644 --- a/jarvis/__init__.py +++ b/jarvis/__init__.py @@ -1,7 +1,7 @@ import os from multiprocessing import current_process -version = "4.4.1" +version = "4.4.2" install_script = os.path.join(os.path.dirname(__file__), 'lib', 'install.sh') diff --git a/jarvis/executors/lights.py b/jarvis/executors/lights.py index 3998e85a..d8944f5b 100644 --- a/jarvis/executors/lights.py +++ b/jarvis/executors/lights.py @@ -80,25 +80,25 @@ def avail_check(self, function_to_call: Callable) -> None: """ status = ThreadPool(processes=1).apply_async(func=self.thread_worker, args=(function_to_call,)) speaker.speak(run=True) # Speak the initial response when the work is happening behind the scenes - failed_msg, failed = [], None try: failed = status.get(5) except ThreadTimeout as error: logger.error(error) - failed_msg.append(support.pluralize(count=len(self.mapping), word="light", to_words=True, cap_word=True)) + return if failed: + failed_msg = [] for light_location, ip_list in failed.items(): if failed_msg: msg = f'{support.pluralize(count=len(ip_list), word="light", to_words=True)} ' else: msg = f'{support.pluralize(count=len(ip_list), word="light", to_words=True, cap_word=True)} ' failed_msg.append(msg + f'from {light_location}') - if len(failed_msg) == 1 and failed_msg[0].startswith('One'): # Failed only on a single lamp - response = "".join(failed_msg) + " isn't available right now!" - else: - response = util.comma_separator(list_=failed_msg) + " aren't available right now!" - logger.error(response) - speaker.speak(text=f"I'm sorry {models.env.title}! {response}") + if len(failed_msg) == 1 and failed_msg[0].startswith('One'): # Failed only on a single lamp + response = "".join(failed_msg) + " isn't available right now!" + else: + response = util.comma_separator(list_=failed_msg) + " aren't available right now!" + logger.error(response) + speaker.speak(text=f"I'm sorry {models.env.title}! {response}") def lights(phrase: str) -> None: diff --git a/release_notes.rst b/release_notes.rst index 6deb4792..0908e651 100644 --- a/release_notes.rst +++ b/release_notes.rst @@ -1,10 +1,14 @@ Release Notes ============= +v4.4.2 (02/03/2024) +------------------- +- Bug fix on flaky response when all the lights fail to connect + v4.4.1 (02/01/2024) ------------------- -- Support upgraded VPN server configuration -- Minor improvements to one-time passcode settings +- Crash fix VPN server config and adapt to new changes +- Minor improvements in one-time passcode settings v4.4 (11/30/2023) -----------------