From d2393f91e8b79b1bc14a2bc9be8a005a93d9b4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 9 Aug 2016 04:42:51 +0200 Subject: [PATCH] qubes/tools: adjust qvm-check for core3 API --- qubes/tools/qvm_check.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qubes/tools/qvm_check.py b/qubes/tools/qvm_check.py index 61ee3900..15eef5ea 100644 --- a/qubes/tools/qvm_check.py +++ b/qubes/tools/qvm_check.py @@ -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