From 547d061757d0eed8c0bf7ba7bbb65e4ad43e236f Mon Sep 17 00:00:00 2001
From: Guba Sándor <guba.sandor@cloud.bme.hu>
Date: Mon, 24 Mar 2014 12:58:15 +0100
Subject: [PATCH] vmdriver: fixed libvirt connection

---
 vmdriver.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vmdriver.py b/vmdriver.py
index 864d823..41bff41 100644
--- a/vmdriver.py
+++ b/vmdriver.py
@@ -13,7 +13,7 @@ from psutil import NUM_CPUS, virtual_memory, cpu_percent
 from celery.contrib.abortable import AbortableTask
 
 from vm import VMInstance
-from vmcelery import celery, lib_connection
+from vmcelery import celery, lib_connection, to_bool
 
 sys.path.append(os.path.dirname(os.path.basename(__file__)))
 
@@ -118,7 +118,7 @@ def connect(connection_string='qemu:///system'):
     the default is the local root.
 
     """
-    if os.getenv('LIBVIRT_KEEPALIVE') is None:
+    if not to_bool(os.getenv('LIBVIRT_KEEPALIVE', "False")):
         if Connection.get() is None:
             Connection.set(libvirt.open(connection_string))
             logging.debug("Connection estabilished to libvirt.")
--
libgit2 0.26.0