Again, drop recursive loop for StreamHandler py26

This commit is contained in:
Jakub Warmuz 2015-10-11 17:10:05 +00:00
parent 9427c474ab
commit 8788f956a7
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA

View file

@ -35,7 +35,8 @@ class StreamHandler(logging.StreamHandler):
:rtype: str
"""
out = (StreamHandler.format(self, record) if sys.version_info < (2, 7)
out = (logging.StreamHandler.format(self, record)
if sys.version_info < (2, 7)
else super(StreamHandler, self).format(record))
if self.colored and record.levelno >= self.red_level:
return ''.join((le_util.ANSI_SGR_RED, out, le_util.ANSI_SGR_RESET))