From 4e8b1f55082bd201c01323a32a192d49c4ded00c Mon Sep 17 00:00:00 2001 From: nicolargo Date: Mon, 21 Apr 2025 10:56:04 +0200 Subject: [PATCH] Correct an issue with VMs bin test --- glances/plugins/vms/engines/multipass.py | 2 +- glances/plugins/vms/engines/virsh.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/glances/plugins/vms/engines/multipass.py b/glances/plugins/vms/engines/multipass.py index 16a2f412..6eb9db24 100644 --- a/glances/plugins/vms/engines/multipass.py +++ b/glances/plugins/vms/engines/multipass.py @@ -22,7 +22,7 @@ from glances.secure import secure_popen MULTIPASS_PATH = '/snap/bin/multipass' MULTIPASS_VERSION_OPTIONS = 'version --format json' MULTIPASS_INFO_OPTIONS = 'info --format json' -import_multipass_error_tag = not os.path.exists(MULTIPASS_PATH) and os.access(MULTIPASS_PATH, os.X_OK) +import_multipass_error_tag = not os.path.exists(MULTIPASS_PATH) or not os.access(MULTIPASS_PATH, os.X_OK) class VmExtension(VmsExtension): diff --git a/glances/plugins/vms/engines/virsh.py b/glances/plugins/vms/engines/virsh.py index 920510ee..c86248eb 100644 --- a/glances/plugins/vms/engines/virsh.py +++ b/glances/plugins/vms/engines/virsh.py @@ -24,7 +24,7 @@ VIRSH_VERSION_OPTIONS = 'version' VIRSH_INFO_OPTIONS = 'list --all' VIRSH_DOMAIN_STATS_OPTIONS = 'domstats' VIRSH_DOMAIN_TITLE_OPTIONS = 'desc --title' -import_virsh_error_tag = not os.path.exists(VIRSH_PATH) and os.access(VIRSH_PATH, os.X_OK) +import_virsh_error_tag = not os.path.exists(VIRSH_PATH) or not os.access(VIRSH_PATH, os.X_OK) class VmExtension(VmsExtension):