qubes/tools: adjust qvm-check for core3 API

This commit is contained in:
Marek Marczykowski-Górecki 2016-08-09 04:42:51 +02:00
parent 4d5a314e77
commit d2393f91e8
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -27,6 +27,7 @@ from __future__ import print_function
import sys
import qubes.tools
import qubes.vm.templatevm
parser = qubes.tools.QubesArgumentParser(description=__doc__, vmname_nargs='+')
parser.add_argument("--running", action="store_true", dest="running",
@ -61,7 +62,8 @@ def main(args=None):
print_msg(paused, "is paused", "are running")
return 0 if paused else 1
elif args.template:
template = [vm for vm in domains if vm.is_template()]
template = [vm for vm in domains if isinstance(vm,
qubes.vm.templatevm.TemplateVM)]
if args.verbose:
print_msg(template, "is a template", "are templates")
return 0 if template else 1