tools: improve --all switch
Don't check VM 'qid' (which require mgmt call), but VM class instead
This commit is contained in:
parent
7a4f36f015
commit
21c65d7ea8
@ -33,6 +33,7 @@ import textwrap
|
|||||||
|
|
||||||
import qubesmgmt.log
|
import qubesmgmt.log
|
||||||
import qubesmgmt.exc
|
import qubesmgmt.exc
|
||||||
|
import qubesmgmt.vm
|
||||||
|
|
||||||
#: constant returned when some action should be performed on all qubes
|
#: constant returned when some action should be performed on all qubes
|
||||||
VM_ALL = object()
|
VM_ALL = object()
|
||||||
@ -142,7 +143,8 @@ class VmNameAction(QubesAction):
|
|||||||
namespace.domains = [
|
namespace.domains = [
|
||||||
vm
|
vm
|
||||||
for vm in app.domains
|
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:
|
else:
|
||||||
if hasattr(namespace, 'exclude') and namespace.exclude:
|
if hasattr(namespace, 'exclude') and namespace.exclude:
|
||||||
|
Loading…
Reference in New Issue
Block a user