From 2457a705d0940de4b79974f79c7057e308a1f670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 30 Jul 2013 11:59:24 +0200 Subject: [PATCH] Load Qubes DB python module only when needed. This is temporary band aid for the python module problems. This should also slightly speed up some tools (not all uses Qubes DB). --- core-modules/000QubesVm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index a26edd96..edbb79e2 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -39,7 +39,6 @@ from qubes import qmemman_algo import libvirt import warnings -from qubes.qdb import QubesDB from qubes.qubes import dry_run,vmm from qubes.qubes import register_qubes_vm_class from qubes.qubes import QubesVmCollection,QubesException,QubesHost,QubesVmLabels @@ -664,6 +663,7 @@ class QubesVm(object): def qdb(self): if self._qdb_connection is None: if self.is_running(): + from qubes.qdb import QubesDB self._qdb_connection = QubesDB(self.name) return self._qdb_connection