From 703534ef6d7d2fff53bb466b08a23884adf23dac Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Sat, 24 Nov 2018 06:47:08 +0900 Subject: [PATCH] py: Fix TracebackDump not to dump duplicated exception type --- py/exception.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/py/exception.go b/py/exception.go index 7d3eec64..8dde2e67 100644 --- a/py/exception.go +++ b/py/exception.go @@ -158,11 +158,7 @@ func (exc *ExceptionInfo) TracebackDump(w io.Writer) { } fmt.Fprintf(w, "Traceback (most recent call last):\n") exc.Traceback.TracebackDump(w) - name := "" - if exc.Type != nil { - name = exc.Type.Name - } - fmt.Fprintf(w, "%v: %v\n", name, exc.Value) + fmt.Fprintf(w, "%v\n", exc.Value) } // Test for being set