Show More
@@ -3466,6 +3466,7 b' def debugstacktrace(' | |||||
3466 | f=procutil.stderr, |
|
3466 | f=procutil.stderr, | |
3467 | otherf=procutil.stdout, |
|
3467 | otherf=procutil.stdout, | |
3468 | depth=0, |
|
3468 | depth=0, | |
|
3469 | prefix=b'', | |||
3469 | ): |
|
3470 | ): | |
3470 | '''Writes a message to f (stderr) with a nicely formatted stacktrace. |
|
3471 | '''Writes a message to f (stderr) with a nicely formatted stacktrace. | |
3471 | Skips the 'skip' entries closest to the call, then show 'depth' entries. |
|
3472 | Skips the 'skip' entries closest to the call, then show 'depth' entries. | |
@@ -3475,9 +3476,9 b' def debugstacktrace(' | |||||
3475 | ''' |
|
3476 | ''' | |
3476 | if otherf: |
|
3477 | if otherf: | |
3477 | otherf.flush() |
|
3478 | otherf.flush() | |
3478 | f.write(b'%s at:\n' % msg.rstrip()) |
|
3479 | f.write(b'%s%s at:\n' % (prefix, msg.rstrip())) | |
3479 | for line in getstackframes(skip + 1, depth=depth): |
|
3480 | for line in getstackframes(skip + 1, depth=depth): | |
3480 | f.write(line) |
|
3481 | f.write(prefix + line) | |
3481 | f.flush() |
|
3482 | f.flush() | |
3482 |
|
3483 | |||
3483 |
|
3484 |
General Comments 0
You need to be logged in to leave comments.
Login now