def emit(self, record):
        try:
            message = self.format(record)
            stream = self.stream
            if not self.is_tty:
                stream.write(message)
            else:
                self.output_colorized(message)
            stream.write(getattr(self, 'terminator', '\n'))
            self.flush()
        except (KeyboardInterrupt, __HOLE__):
            raise
        except:
            self.handleError(record)
dataset/ETHPy150Open opencivicdata/pupa/pupa/ext/ansistrm.py/ColorizingStreamHandler.emit