Reviewed-By: Ramon Medeiros <ramonn@br.ibm.com>


On 12/12/2016 12:14 PM, bianca@linux.vnet.ibm.com wrote:
From: Bianca Carvalho <bianca@linux.vnet.ibm.com>

Changed "registerAttachDevicesEvent" in model/libvirtevents.py file
to include AttributeError as a exception to make sure kimchi will
be running even if this exception is true.
Also fixed indentation in vms.py file.

Signed-off-by: Bianca Carvalho <bianca@linux.vnet.ibm.com>
---
 model/libvirtevents.py | 2 +-
 model/vms.py           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/model/libvirtevents.py b/model/libvirtevents.py
index 2dd9904..716420c 100644
--- a/model/libvirtevents.py
+++ b/model/libvirtevents.py
@@ -101,7 +101,7 @@ class LibvirtEvents(object):
                 cb,
                 arg)

-        except libvirt.libvirtError as e:
+        except (AttributeError, libvirt.libvirtError), e:
             wok_log.error("register attach event failed: %s" % e.message)

     def registerDetachDevicesEvent(self, conn, cb, arg):
diff --git a/model/vms.py b/model/vms.py
index d703c89..d6f8020 100644
--- a/model/vms.py
+++ b/model/vms.py
@@ -1108,7 +1108,7 @@ class VMModel(object):

     def update_cpu_live(self, dom, vcpus):
         flags = libvirt.VIR_DOMAIN_AFFECT_LIVE | \
-                libvirt.VIR_DOMAIN_AFFECT_CONFIG
+            libvirt.VIR_DOMAIN_AFFECT_CONFIG
         try:
             dom.setVcpusFlags(vcpus, flags)
         except libvirt.libvirtError as e:

-- 

Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn@br.ibm.com