def format_exception(exc, value, tb): formatted, colored_source = better_exceptions.format_traceback(tb) if not str(value) and exc is AssertionError: value.args = (colored_source,) title = traceback.format_exception_only(exc, value) title = from_utf8(title[0].strip()) full_trace = u'Traceback (most recent call last):\n{}{}\n'.format(formatted, title) return full_trace
def format_exception(exc, value, tb): formatted, colored_source = better_exceptions.format_traceback(tb) if not str(value) and exc is AssertionError: value.args = (colored_source,) title = traceback.format_exception_only(exc, value) title = title[0].strip() full_trace = u'Traceback (most recent call last):\n{}{}\n'.format(formatted, title) return full_trace