mirror of https://github.com/rq/rq.git
Avoid new-style classes under Python 2.6.
Little ugly fix, required because Python 2.6's logging uses old-style classes. Thanks for finding this one, @deferraz.
This commit is contained in:
parent
77fb32791d
commit
e1b81b1669
|
@ -9,6 +9,8 @@ import os
|
|||
import sys
|
||||
import logging
|
||||
|
||||
from compat import is_python_version
|
||||
|
||||
|
||||
def gettermsize():
|
||||
def ioctl_GWINSZ(fd):
|
||||
|
@ -134,7 +136,10 @@ class ColorizingStreamHandler(logging.StreamHandler):
|
|||
|
||||
def __init__(self, exclude=None, *args, **kwargs):
|
||||
self.exclude = exclude
|
||||
super(ColorizingStreamHandler, self).__init__(*args, **kwargs)
|
||||
if is_python_version((2,6)):
|
||||
logging.StreamHandler.__init__(self, *args, **kwargs)
|
||||
else:
|
||||
super(ColorizingStreamHandler, self).__init__(*args, **kwargs)
|
||||
|
||||
@property
|
||||
def is_tty(self):
|
||||
|
|
Loading…
Reference in New Issue