Blob Blame History Raw
From 7fd1c3be6bb744a93eff6ae1a9cfcdd9280cf247 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.24.1