From 5f62c212725c32ca1a2cd0462e3e44b6c05ff251 Mon Sep 17 00:00:00 2001 From: fijal Date: Sat, 4 Aug 2007 16:24:56 +0200 Subject: [PATCH] [svn r45484] A comment why this will not work on different python version --HG-- branch : trunk --- py/code/traceback2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py/code/traceback2.py b/py/code/traceback2.py index e07fdeff2..07f6b3db4 100644 --- a/py/code/traceback2.py +++ b/py/code/traceback2.py @@ -1,5 +1,6 @@ from __future__ import generators -import py +import py +import sys class TracebackEntry(object): """ a single entry in a traceback """ @@ -9,6 +10,9 @@ class TracebackEntry(object): def __init__(self, rawentry): self._rawentry = rawentry self.frame = py.code.Frame(rawentry.tb_frame) + # Ugh. 2.4 and 2.5 differs here when encountering + # multi-line statements. Not sure about the solution, but + # should be portable self.lineno = rawentry.tb_lineno - 1 self.relline = self.lineno - self.frame.code.firstlineno