Return a string containing a traceback message for the given exc_info tuple (as returned by sys.exc_info()).
(exc_info)
| 263 | return re.sub('(?m)^(?!$)', indent*' ', s) |
| 264 | |
| 265 | def _exception_traceback(exc_info): |
| 266 | """ |
| 267 | Return a string containing a traceback message for the given |
| 268 | exc_info tuple (as returned by sys.exc_info()). |
| 269 | """ |
| 270 | # Get a traceback message. |
| 271 | excout = StringIO() |
| 272 | exc_type, exc_val, exc_tb = exc_info |
| 273 | traceback.print_exception(exc_type, exc_val, exc_tb, file=excout) |
| 274 | return excout.getvalue() |
| 275 | |
| 276 | # Override some StringIO methods. |
| 277 | class _SpoofOut(StringIO): |
no test coverage detected
searching dependent graphs…