Merge pull request #222 from jpunwin/master

Workaround getting isatty from a poorly implemented stdout object
main
Vincent Driessen 12 years ago
commit d23963a973

@ -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()
if hasattr(sys.stdout, "isatty"):
self.notty = not sys.stdout.isatty()
else:
self.notty = True
def reset_color(self):
return self.codes["reset"]

Loading…
Cancel
Save