Martin Sivák has uploaded a new change for review.

Change subject: Fix an error when the brokerlink's return value has no data
......................................................................

Fix an error when the brokerlink's return value has no data

Change-Id: I0f1e96595ca07c20bae6fba805ae2bc4ba3e5151
Signed-off-by: Martin Sivak <msi...@redhat.com>
---
M ovirt_hosted_engine_ha/lib/brokerlink.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-ha 
refs/changes/99/25799/1

diff --git a/ovirt_hosted_engine_ha/lib/brokerlink.py 
b/ovirt_hosted_engine_ha/lib/brokerlink.py
index b197d87..bb636ea 100644
--- a/ovirt_hosted_engine_ha/lib/brokerlink.py
+++ b/ovirt_hosted_engine_ha/lib/brokerlink.py
@@ -186,9 +186,12 @@
         """
         response = self._communicate(request)
         parts = response.split(" ", 1)
-        if len(parts) > 1 and parts[0] == "success":
+        if len(parts) >= 1 and parts[0] == "success":
             self._log.debug("Successful response from socket")
-            return parts[1]
+            try:
+                return parts[1]
+            except IndexError:
+                return ""
         else:
             self._log.debug("Failed response from socket")
             if len(parts) > 1:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f1e96595ca07c20bae6fba805ae2bc4ba3e5151
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-ha
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to