Blob Blame History Raw
From 8659766f3559177edf60f7ed6e1ed834f5d4d4a0 Mon Sep 17 00:00:00 2001
From: Nir Soffer <nirsof@gmail.com>
Date: Mon, 18 Nov 2019 23:53:46 +0200
Subject: [PATCH] rhv-upload: Show transfer id in error message

(cherry picked from commit d4ca9b6ca42d4ad3c717f5c59402ca6ff5d322bb
in virt-v2v)
---
 v2v/rhv-upload-plugin.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
index f13405df1..9b83d1cfa 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -194,8 +194,10 @@ def open(readonly):
         if transfer.phase != types.ImageTransferPhase.INITIALIZING:
             break
         if time.time() > endt:
-            raise RuntimeError("timed out waiting for transfer status "
-                               "!= INITIALIZING")
+            raise RuntimeError(
+                "timed out waiting for transfer %s status != INITIALIZING"
+                % transfer.id)
+
         time.sleep(1)
 
     # Now we have permission to start the transfer.
-- 
2.18.4