Blob Blame Raw
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 10 Aug 2015 12:56:11 -0400
Subject: [PATCH virt-manager] create: Fix backtrace when reporting OS error
 (bz 1241902)

(cherry picked from commit cca72a73c496b715bc90ee277291d0cbcf6d1771)
---
 virtManager/create.py | 2 +-
 virtManager/error.py  | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/virtManager/create.py b/virtManager/create.py
index 8401a7a..452c8d0 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -1402,7 +1402,7 @@ class vmmCreate(vmmGObjectUI):
             if variant:
                 guest.os_variant = variant
         except ValueError, e:
-            self.err.show_err(_("Error setting OS information."), e)
+            self.err.show_err(_("Error setting OS information."), str(e))
             return None
 
         if guest.os.is_arm64():
diff --git a/virtManager/error.py b/virtManager/error.py
index 30fc67e..5a838f7 100644
--- a/virtManager/error.py
+++ b/virtManager/error.py
@@ -89,6 +89,8 @@ class vmmErrorDialog(vmmGObject):
             tb = "".join(traceback.format_exc()).strip()
             if tb != "None":
                 details += "\n\n" + tb
+        else:
+            details = str(details)
 
         if debug:
             debugmsg = "error dialog message:\nsummary=%s" % summary