Blob Blame History Raw
# HG changeset patch
# User "Cole Robinson <crobinso@redhat.com>"
# Date 1221578360 14400
# Node ID b39a144682b8cf372dc34aa5e64155d5ad4cb0bc
# Parent  63a843fec103157a6c4048d5486c4ba0843439a3
Log traceback (if available) from cli fail helper.

diff -r 63a843fec103 -r b39a144682b8 virtinst/cli.py
--- a/virtinst/cli.py	Fri Sep 12 14:59:04 2008 -0400
+++ b/virtinst/cli.py	Tue Sep 16 11:19:20 2008 -0400
@@ -106,6 +106,10 @@
 def fail(msg):
     """Convenience function when failing in cli app"""
     logging.error(msg)
+    import traceback
+    tb = "".join(traceback.format_exc()).strip()
+    if tb != "None":
+        logging.debug(tb)
     sys.exit(1)
 
 def nice_exit():