Dan Kenigsberg has uploaded a new change for review.

Change subject: _findLiveSnapshotSupport: do not assume that guest <features> 
exist
......................................................................

_findLiveSnapshotSupport: do not assume that guest <features> exist

Change-Id: I8e6d1ae6d020bedcfa8f2986fce628714e877765
Signed-off-by: Dan Kenigsberg <dan...@redhat.com>
---
M vdsm/caps.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/28349/1

diff --git a/vdsm/caps.py b/vdsm/caps.py
index c5458e6..a4caa13 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -191,8 +191,11 @@
     None if libvirt does not report the live
     snapshot support (as in version <= 1.2.2),
     '''
-    features = guest.getElementsByTagName('features')[0]
-    for feature in features.childNodes:
+    features = guest.getElementsByTagName('features')
+    if not features:
+        return None
+
+    for feature in features[0].childNodes:
         if feature.nodeName == 'disksnapshot':
             value = feature.getAttribute('default')
             if value.lower() == 'on':


-- 
To view, visit http://gerrit.ovirt.org/28349
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e6d1ae6d020bedcfa8f2986fce628714e877765
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <dan...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to