From 21c65d7ea8a30bdfc429809e1a002cc63195b79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 15 Apr 2017 14:57:30 +0200 Subject: [PATCH] tools: improve --all switch Don't check VM 'qid' (which require mgmt call), but VM class instead --- qubesmgmt/tools/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qubesmgmt/tools/__init__.py b/qubesmgmt/tools/__init__.py index d962c12..cb927fe 100644 --- a/qubesmgmt/tools/__init__.py +++ b/qubesmgmt/tools/__init__.py @@ -33,6 +33,7 @@ import textwrap import qubesmgmt.log import qubesmgmt.exc +import qubesmgmt.vm #: constant returned when some action should be performed on all qubes VM_ALL = object() @@ -142,7 +143,8 @@ class VmNameAction(QubesAction): namespace.domains = [ vm for vm in app.domains - if vm.qid != 0 and vm.name not in namespace.exclude + if not isinstance(vm, qubesmgmt.vm.AdminVM) and + vm.name not in namespace.exclude ] else: if hasattr(namespace, 'exclude') and namespace.exclude: