From e707264382a1156d2ca4f61b50dbe1c63dca8bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Thu, 29 Sep 2005 16:21:50 +0000 Subject: [PATCH] show traceback on Python errors too... --- pisi-cli | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pisi-cli b/pisi-cli index 5de09e9e..5131b8dc 100755 --- a/pisi-cli +++ b/pisi-cli @@ -38,16 +38,20 @@ def handle_exception(exception, value, tb): ui.error(_("Fatal Error:")) traceback = ctx.options and ctx.options.debug elif exception == pisi.Exception: - ui.error(_(""" -Internal PISI Error: -Please file a bug report! (http://bugs.uludag.org.tr) -""")) + traceback = True + else: + # For any other exception (possibly Python exceptions) show + # the traceback! traceback = True ui.error("%s" %exception) ui.error("%s\n" %value) if traceback: + ui.error(_(""" +Internal PISI Error: +Please file a bug report! (http://bugs.uludag.org.tr) +""")) ui.info(_("Traceback:")) traceback.print_tb(tb)