From af04545bbff8024222d9736cf2d03df0b6149614 Mon Sep 17 00:00:00 2001 From: Justin Unwin Date: Tue, 11 Jun 2013 00:07:53 +0200 Subject: [PATCH] Ok i am being lazy using the try catch --- rq/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rq/utils.py b/rq/utils.py index c5d50cfd..44bbe65f 100644 --- a/rq/utils.py +++ b/rq/utils.py @@ -70,9 +70,9 @@ class _Colorizer(object): self.codes["fuscia"] = self.codes["fuchsia"] self.codes["white"] = self.codes["bold"] - try: + if hasattr(sys.stdout, "isatty"): self.notty = not sys.stdout.isatty() - except: + else: self.notty = True def reset_color(self):