/usr/lib/python2.7/dist-packages/colorlog/tests/testing_stream_handler.py is in python-colorlog 3.1.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 | import logging
import sys
import traceback
class TestingStreamHandler(logging.StreamHandler):
"""Raise errors to be caught by py.test instead of printing to stdout."""
def handleError(self, record):
_type, value, _traceback = sys.exc_info()
raise value
|