Use QubesVMMConnection object

Introduced in core-admin:
af521bd Wrap all VMM connection related object into QubesVMMConnection
class
This commit is contained in:
Marek Marczykowski 2013-05-18 03:54:23 +02:00 committed by Marek Marczykowski-Górecki
parent 43770dae36
commit 0eaae9790c

View File

@ -3,7 +3,7 @@ import sys
import os import os
import os.path import os.path
import subprocess import subprocess
from qubes.qubes import libvirt_conn from qubes.qubes import vmm
import qubes.guihelpers import qubes.guihelpers
from optparse import OptionParser from optparse import OptionParser
import fcntl import fcntl
@ -82,7 +82,7 @@ def find_policy(policy, domain, target):
return get_default_policy() return get_default_policy()
def is_domain_running(target): def is_domain_running(target):
libvirt_dom = libvirt_conn.lookupByName(target) libvirt_dom = vmm.libvirt_conn.lookupByName(target)
if libvirt_dom: if libvirt_dom:
return libvirt_dom.isActive() return libvirt_dom.isActive()
else: else: