another couple of checks on jython, still some problems

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-04-23 19:05:22 +02:00
parent 221ac3e466
commit b3a05b545e
9 changed files with 25 additions and 9 deletions

View File

@@ -523,7 +523,8 @@ class FormattedExcinfo(object):
source = py.code.Source("???")
line_index = 0
else:
line_index = entry.lineno - entry.getfirstlinesource()
# entry.getfirstlinesource() can be -1, should be 0 on jython
line_index = entry.lineno - max(entry.getfirstlinesource(), 0)
lines = []
if self.style == "long":