From 0d04a2f33ebb141a21e2c300051dc3f8de8bad48 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Mon, 9 Mar 2026 05:46:04 +0000 Subject: [PATCH] add support for 'host' in toml vban config fix error with VBANCMDConnectionError error dialog --- vmcompact/menu.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vmcompact/menu.py b/vmcompact/menu.py index 85833af..092dff0 100644 --- a/vmcompact/menu.py +++ b/vmcompact/menu.py @@ -357,15 +357,17 @@ class Menus(tk.Menu): opts = {} opts |= self.vban_config[f'connection-{i + 1}'] kind_id = opts.pop('kind') + if 'ip' in opts: + opts['host'] = opts.pop('ip') self.vban = vban_cmd.api(kind_id, **opts) # login to vban interface try: - self.logger.info(f'Attempting vban connection to {opts.get("ip")}') + self.logger.info(f'Attempting vban connection to {opts.get("host")}') self.vban.login() except VBANCMDConnectionError as e: self.vban.logout() msg = ( - f'Timeout attempting to establish connection to {opts.get("ip")}', + f'Timeout attempting to establish connection to {opts.get("host")}', 'Please check your connection settings', ) messagebox.showerror('Connection Error', '\n'.join(msg))