Return a string containing a traceback message for the given exc_info tuple (as returned by sys.exc_info()).
(exc_info)
| 242 | return re.sub('(?m)^(?!$)', indent*' ', s) |
| 243 | |
| 244 | def _exception_traceback(exc_info): |
| 245 | """ |
| 246 | Return a string containing a traceback message for the given |
| 247 | exc_info tuple (as returned by sys.exc_info()). |
| 248 | """ |
| 249 | # Get a traceback message. |
| 250 | excout = StringIO() |
| 251 | exc_type, exc_val, exc_tb = exc_info |
| 252 | traceback.print_exception(exc_type, exc_val, exc_tb, file=excout) |
| 253 | return excout.getvalue() |
| 254 | |
| 255 | # Override some StringIO methods. |
| 256 | class _SpoofOut(StringIO): |
no test coverage detected