diff --git a/ovos_dinkum_listener/service.py b/ovos_dinkum_listener/service.py index 1388c28..80c4216 100644 --- a/ovos_dinkum_listener/service.py +++ b/ovos_dinkum_listener/service.py @@ -808,7 +808,7 @@ def _handle_listen(self, message: Message): dur = get_sound_duration(sound) LOG.debug(f"{sound} duration: {dur} seconds") self.voice_loop.confirmation_seconds_left = dur - except: + except Exception: self.voice_loop.confirmation_seconds_left = self.voice_loop.confirmation_seconds else: self.voice_loop.state = ListeningState.BEFORE_COMMAND @@ -1068,7 +1068,7 @@ def reload_configuration(self): self.status.set_alive() if not self.disable_reload and new_hash['stt'] != self._applied_config_hash['stt']: - LOG.info(f"Reloading STT") + LOG.info("Reloading STT") if self.stt: LOG.debug(f"old={self.stt.__class__}: {self.stt.config}") if hasattr(self.stt, "shutdown"): @@ -1079,9 +1079,8 @@ def reload_configuration(self): if self.stt: LOG.debug(f"new={self.stt.__class__}: {self.stt.config}") - if not self.disable_reload and not self.disable_fallback and new_hash['fallback'] != \ - self._applied_config_hash['fallback']: - LOG.info(f"Reloading Fallback STT") + if not self.disable_reload and not self.disable_fallback and new_hash['fallback'] != self._applied_config_hash['fallback']: + LOG.info("Reloading Fallback STT") if self.fallback_stt: LOG.debug(f"old={self.fallback_stt.__class__}: " f"{self.fallback_stt.config}") @@ -1095,7 +1094,7 @@ def reload_configuration(self): f"{self.fallback_stt.config}") if not self.disable_hotword_reload and new_hash['hotwords'] != self._applied_config_hash['hotwords']: - LOG.info(f"Reloading Hotwords") + LOG.info("Reloading Hotwords") LOG.debug(f"old={self.hotwords.applied_hotwords_config}") self._reload_event.clear() self.voice_loop.stop() @@ -1104,7 +1103,7 @@ def reload_configuration(self): LOG.debug(f"new={self.hotwords.applied_hotwords_config}") if new_hash['loop'] != self._applied_config_hash['loop']: - LOG.info(f"Reloading Listener") + LOG.info("Reloading Listener") self._reload_event.clear() self.voice_loop.stop() diff --git a/ovos_dinkum_listener/transformers.py b/ovos_dinkum_listener/transformers.py index f1ba959..dd0de37 100644 --- a/ovos_dinkum_listener/transformers.py +++ b/ovos_dinkum_listener/transformers.py @@ -53,7 +53,7 @@ def load_plugins(self): self.loaded_plugins[plug_name] = plug() self.loaded_plugins[plug_name].bind(self.bus) LOG.info(f"loaded audio transformer plugin: {plug_name}") - except Exception as e: + except Exception: LOG.exception(f"Failed to load audio transformer plugin: " f"{plug_name}") self.has_loaded = True