From d4b2b90fc015ae16c5cf17a3a16f6e0df59028bf Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Sat, 24 Sep 2022 08:04:59 +0100 Subject: [PATCH] run vban.logout() to cleanup threads/sockets. bump vban-cmd dependency ver. patch bump --- poetry.lock | 4 ++-- pyproject.toml | 4 ++-- vmcompact/menu.py | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6f1919c..b30803b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -84,7 +84,7 @@ python-versions = ">=3.7" [[package]] name = "vban-cmd" -version = "1.4.3" +version = "1.4.4" description = "Python interface for the VBAN RT Packet Service (Sendtext)" category = "main" optional = false @@ -107,7 +107,7 @@ tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""} [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "df755b86361b6c58978bcdc7875d8d8e5f4d554d13b189823347d64994ba1507" +content-hash = "1013fe45920526153e77b65bd21f9cdaac34841917159ea85565bec747c1e455" [metadata.files] black = [] diff --git a/pyproject.toml b/pyproject.toml index 57f8ef2..39049c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "voicemeeter-compact" -version = "1.5.2" +version = "1.5.3" description = "A Compact Voicemeeter Remote App" authors = ["onyx-and-iris "] license = "MIT" @@ -17,7 +17,7 @@ python = "^3.10" sv-ttk = "^2.0" tomli = { version = "^2.0.1", python = "<3.11" } voicemeeter-api = "^0.7.0" -vban-cmd = "^1.4.3" +vban-cmd = "^1.4.4" [tool.poetry.dev-dependencies] black = {version = "^22.6.0", allow-prereleases = true} diff --git a/vmcompact/menu.py b/vmcompact/menu.py index 153733f..4ba0bc1 100644 --- a/vmcompact/menu.py +++ b/vmcompact/menu.py @@ -5,6 +5,7 @@ from tkinter import messagebox, ttk import sv_ttk import vban_cmd +from vban_cmd.error import VBANCMDError from .data import _base_values, _configuration, get_configuration, kind_get @@ -304,10 +305,10 @@ class Menus(tk.Menu): # login to vban interface try: self.vban.login() - except TimeoutError as e: - messagebox.showerror( - "Connection Error", f"Unable to establish connection with {opts['ip']}" - ) + except VBANCMDError as e: + msg = (str(e), f"Please check your connection settings") + messagebox.showerror("Connection Error", "\n".join(msg)) + self.vban.logout() self.after(1, self.enable_vban_menus) return self.menu_teardown(i)