mirror of https://github.com/rq/rq.git
Fix a problem caused when a nonstandard stdout is defined and not
properly implemented
This commit is contained in:
parent
7ea02d4029
commit
17be896744
|
@ -69,8 +69,11 @@ class _Colorizer(object):
|
|||
self.codes["darkyellow"] = self.codes["brown"]
|
||||
self.codes["fuscia"] = self.codes["fuchsia"]
|
||||
self.codes["white"] = self.codes["bold"]
|
||||
self.notty = not sys.stdout.isatty()
|
||||
|
||||
try:
|
||||
self.notty = not sys.stdout.isatty()
|
||||
except:
|
||||
self.notty = True
|
||||
|
||||
def reset_color(self):
|
||||
return self.codes["reset"]
|
||||
|
|
Loading…
Reference in New Issue