Changeset 3508
- Timestamp:
- 04/12/08 22:30:45 (5 months ago)
- Files:
-
- tracbacksplugin/0.11/tracbacks/tracbacks.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tracbacksplugin/0.11/tracbacks/tracbacks.py
r3507 r3508 114 114 end = index + len(string_representation) + self.EXCERPT_CHARACTERS 115 115 116 # Make sure we don't go into the negative. 117 if start < 0: 116 left_ellipsis = "..." 117 right_ellipsis = "..." 118 119 # Make sure we don't go into the negative. Also, make the ellipsis' 120 # disappear if we're not actually cutting up the comment. 121 if start <= 0: 122 left_ellipsis = "" 118 123 start = 0 124 125 if end >= len(comment): 126 right_ellipsis = "" 119 127 120 128 excerpt = comment[start:end] … … 123 131 # There's probably a better way to say this in python, but Tim doesn't know 124 132 # how to do it. (He's tried """ but something's foobar'ed.) 125 excerpts.append("\n> '' ...%s...''\n" % excerpt)133 excerpts.append("\n> ''%s%s%s''\n" % (left_ellipsis, excerpt, right_ellipsis)) 126 134 127 135 tracback += ''.join(excerpts)
