Skip to content

Commit

Permalink
Fix: fixed bug risks
Browse files Browse the repository at this point in the history
  • Loading branch information
soumt-r committed Jun 29, 2023
1 parent 47e3d15 commit e6992fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions OSC-SRTC.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from modules.SRTC_Extension import SRTC_Extension
from modules.SRTC_OSC import SRTC_OSC

# sys.stdout = sys.stderr = open(os.devnull, "w") # noconsole fix
sys.stdout = sys.stderr = open(os.devnull, "w") # noconsole fix

Supported_Languages: list[str] = [
"English",
Expand Down Expand Up @@ -189,7 +189,7 @@ def main_thread():
GUI.print_log("INFO", "main_execute_extension")
to_send_message = Extension.execute_extension(to_send_message)
GUI.print_log("INFO", "main_start_sending", text=to_send_message)
GUI.print_log(" ")
GUI.print_log(" ", " ")
if to_send_message != "{Sended-Already}":
OSC.send("/chatbox/input", [to_send_message, True])
except Exception:
Expand Down
6 changes: 3 additions & 3 deletions modules/SRTC_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ def _option_changed_ui_language(self, *args):
self._Button_Start.configure(text=i18n.t("gui_start_button"))
self._option_changed()

def print_log(self, type: str, i18n_key: str, **kwargs):
def print_log(self, msg_type: str, i18n_key: str, **kwargs):
"""Print the log to the log textbox"""
if self._log_textbox is None:
self._log_temp += "[" + type + "] " + i18n.t(i18n_key, kwargs=kwargs) + "\n"
self._log_temp += "[" + msg_type + "] " + i18n.t(i18n_key, kwargs=kwargs) + "\n"
else:
self._log_textbox.configure(state="normal")
if not self._log_temp_printed:
self._log_textbox.insert("end", self._log_temp)
self._log_temp_printed = True

self._log_textbox.insert(
"end", "[" + type + "] " + i18n.t(i18n_key, kwargs=kwargs) + "\n"
"end", "[" + msg_type + "] " + i18n.t(i18n_key, kwargs=kwargs) + "\n"
)
self._log_textbox.see("end")
self._log_textbox.configure(state="disabled")
Expand Down
2 changes: 1 addition & 1 deletion modules/SRTC_Recognizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def ListenAndRecognize(
"ERROR",
"recognizer_unknown_value_error",
)
except sr.RequestError as e:
except sr.RequestError:
self.__print_log(
"ERROR",
"recognizer_request_error",
Expand Down

0 comments on commit e6992fe

Please sign in to comment.