This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thewtex
Recipients amaury.forgeotdarc, thewtex
Date 2009-10-07.20:16:51
SpamBayes Score 3.6879462e-06
Marked as misclassified No
Message-id <1254946613.11.0.18963259772.issue6962@psf.upfronthosting.co.za>
In-reply-to
Content
Sorry about the lack of the attached file.  I will try again and include
it inline.  

That other patch does not fix the bug I am seeing, which is experienced
while using traceback.format_exception_only directly.

Thanks.

--- /usr/lib/python2.6/traceback.py     2009-09-23 19:49:17.000000000 -0500
+++ /home/matt/tmp/traceback.py 2009-09-21 17:09:49.590440613 -0500
@@ -190,11 +190,10 @@
         if badline is not None:
             lines.append('    %s\n' % badline.strip())
             if offset is not None:
-                caretspace = badline[:offset].lstrip()
+                caretspace = badline[:offset-1].lstrip()
                 # non-space whitespace (likes tabs) must be kept for
alignment
                 caretspace = ((c.isspace() and c or ' ') for c in
caretspace)
-                # only three spaces to account for offset1 == pos 0
-                lines.append('   %s^\n' % ''.join(caretspace))
+                lines.append('    %s^\n' % ''.join(caretspace))
             value = msg
 
     lines.append(_format_final_exc_line(stype, value))
History
Date User Action Args
2009-10-07 20:16:53thewtexsetrecipients: + thewtex, amaury.forgeotdarc
2009-10-07 20:16:53thewtexsetmessageid: <1254946613.11.0.18963259772.issue6962@psf.upfronthosting.co.za>
2009-10-07 20:16:51thewtexlinkissue6962 messages
2009-10-07 20:16:51thewtexcreate