Ala Hino has uploaded a new change for review.

Change subject: qemuimg: Add the command to QImgError
......................................................................

qemuimg: Add the command to QImgError

Change-Id: I226a54b29ae4afc3854056efea78767383b89619
Signed-off-by: Ala Hino <ah...@redhat.com>
---
M lib/vdsm/qemuimg.py
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/65179/1

diff --git a/lib/vdsm/qemuimg.py b/lib/vdsm/qemuimg.py
index c9e72ec..26d0ec1 100644
--- a/lib/vdsm/qemuimg.py
+++ b/lib/vdsm/qemuimg.py
@@ -53,15 +53,16 @@
 
 
 class QImgError(Exception):
-    def __init__(self, ecode, stdout, stderr, message=None):
+    def __init__(self, cmd, ecode, stdout, stderr, message=None):
+        self.cmd = cmd
         self.ecode = ecode
         self.stdout = stdout
         self.stderr = stderr
         self.message = message
 
     def __str__(self):
-        return "ecode=%s, stdout=%s, stderr=%s, message=%s" % (
-            self.ecode, self.stdout, self.stderr, self.message)
+        return "cmd=%s, ecode=%s, stdout=%s, stderr=%s, message=%s" % (
+            self.cmd, self.ecode, self.stdout, self.stderr, self.message)
 
 
 def info(image, format=None):
@@ -344,5 +345,5 @@
 def _run_cmd(cmd, cwd=None):
     rc, out, err = commands.execCmd(cmd, raw=True, cwd=cwd)
     if rc != 0:
-        raise QImgError(rc, out, err)
+        raise QImgError(cmd, rc, out, err)
     return out


-- 
To view, visit https://gerrit.ovirt.org/65179
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I226a54b29ae4afc3854056efea78767383b89619
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ah...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to