Browse Source

Should not call fh.isatty directly, but use utils.isatty(fh) instead.

Closes #477
Ask Solem 13 years ago
parent
commit
8f9f4d3622
1 changed files with 2 additions and 2 deletions
  1. 2 2
      celery/apps/worker.py

+ 2 - 2
celery/apps/worker.py

@@ -14,7 +14,7 @@ import warnings
 from .. import __version__, platforms, signals
 from ..app import app_or_default
 from ..exceptions import ImproperlyConfigured, SystemTerminate
-from ..utils import get_full_cls_name, LOG_LEVELS, cry
+from ..utils import get_full_cls_name, isatty, LOG_LEVELS, cry
 from ..worker import WorkController
 
 BANNER = """
@@ -98,7 +98,7 @@ class Worker(object):
         if autoscale:
             max_c, _, min_c = autoscale.partition(",")
             self.autoscale = [int(max_c), min_c and int(min_c) or 0]
-        self._isatty = sys.stdout.isatty()
+        self._isatty = isatty(sys.stdout)
 
         self.colored = app.log.colored(self.logfile)